Skip to content

add typings #1

Description

@Drapegnik

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch http-range-parse@1.0.0 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/http-range-parse/index.d.ts b/node_modules/http-range-parse/index.d.ts
new file mode 100644
index 0000000..7ef8f87
--- /dev/null
+++ b/node_modules/http-range-parse/index.d.ts
@@ -0,0 +1,18 @@
+declare module 'http-range-parse' {
+  declare interface Range {
+    first: number;
+    last: number;
+  }
+
+  declare function parse(
+    str: string
+  ): {
+    unit?: string;
+    first?: number;
+    last?: number;
+    suffix?: number;
+    ranges?: Range[];
+  };
+
+  export default parse;
+}

This issue body was partially generated by patch-package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions