From 7efb00909923a908c016dffc8e9e3e87765dfdce Mon Sep 17 00:00:00 2001 From: Zamiell <5511220+Zamiell@users.noreply.github.com> Date: Tue, 10 Sep 2024 14:53:13 -0400 Subject: [PATCH 1/4] update --- index.d.ts | 9 +++++++++ package.json | 2 ++ 2 files changed, 11 insertions(+) create mode 100644 index.d.ts diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..923e05f --- /dev/null +++ b/index.d.ts @@ -0,0 +1,9 @@ +interface BlockComment { + value: string; + codeStart?: number; +} + +declare module "extract-comments" { + const extractComments: (text: string) => BlockComment[]; + export default extractComments; +} diff --git a/package.json b/package.json index 9054817..469032f 100644 --- a/package.json +++ b/package.json @@ -16,9 +16,11 @@ "license": "MIT", "files": [ "index.js", + "index.d.ts", "lib" ], "main": "index.js", + "types": "index.d.ts", "engines": { "node": ">=6" }, From 8be262989e82d5ea5e17d87fd02d5f1ac7f6957a Mon Sep 17 00:00:00 2001 From: Zamiell <5511220+Zamiell@users.noreply.github.com> Date: Tue, 10 Sep 2024 14:57:22 -0400 Subject: [PATCH 2/4] update --- index.d.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/index.d.ts b/index.d.ts index 923e05f..119becc 100644 --- a/index.d.ts +++ b/index.d.ts @@ -3,7 +3,4 @@ interface BlockComment { codeStart?: number; } -declare module "extract-comments" { - const extractComments: (text: string) => BlockComment[]; - export default extractComments; -} +export default function extractComments(text: string): BlockComment[]; From 90980cd9f8126cd65b8ad929ea28c146edf69f92 Mon Sep 17 00:00:00 2001 From: Zamiell <5511220+Zamiell@users.noreply.github.com> Date: Tue, 10 Sep 2024 14:58:28 -0400 Subject: [PATCH 3/4] update --- index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/index.d.ts b/index.d.ts index 119becc..6005c2a 100644 --- a/index.d.ts +++ b/index.d.ts @@ -3,4 +3,5 @@ interface BlockComment { codeStart?: number; } +/** @see https://github.com/jonschlinkert/extract-comments */ export default function extractComments(text: string): BlockComment[]; From 29b5cad1940b31dfaa7fe7dd83b184a5fe331298 Mon Sep 17 00:00:00 2001 From: Zamiell <5511220+Zamiell@users.noreply.github.com> Date: Tue, 10 Sep 2024 15:27:59 -0400 Subject: [PATCH 4/4] update --- index.d.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index 6005c2a..f037ba3 100644 --- a/index.d.ts +++ b/index.d.ts @@ -4,4 +4,6 @@ interface BlockComment { } /** @see https://github.com/jonschlinkert/extract-comments */ -export default function extractComments(text: string): BlockComment[]; +declare function extractComments(text: string): BlockComment[]; + +export = extractComments;