Skip to content

Commit a6e983d

Browse files
committed
[WIP] Add TypeScript declaration files to output
Closes #150
1 parent 3e36fa0 commit a6e983d

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

bili.config.base.ts

+9-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,15 @@ const config: Config = {
44
plugins: {
55
typescript2: {
66
tsconfigOverride: {
7-
include: ["src"],
8-
exclude: ["**/*.test.ts"]
7+
useTsconfigDeclarationDir: true,
8+
tsconfigOverride: {
9+
include: ["src"],
10+
exclude: ["**/*.test.ts"],
11+
compilerOptions: {
12+
declaration: true,
13+
declarationDir: "./dist/types"
14+
}
15+
}
916
}
1017
}
1118
},

bili.config.community.ts

+9-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,15 @@ const config: Config = {
44
plugins: {
55
typescript2: {
66
tsconfigOverride: {
7-
include: ["src"],
8-
exclude: ["**/*.test.ts"]
7+
useTsconfigDeclarationDir: true,
8+
tsconfigOverride: {
9+
include: ["src"],
10+
exclude: ["**/*.test.ts"],
11+
compilerOptions: {
12+
declaration: true,
13+
declarationDir: "./dist/types"
14+
}
15+
}
916
}
1017
}
1118
},

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"module": "dist/ad-notations.esm.js",
1414
"unpkg": "dist/ad-notations.umd.js",
1515
"jsdelivr": "dist/ad-notations.umd.js",
16+
"types": "dist/types/index.d.ts",
1617
"keywords": [
1718
"notations",
1819
"numbers"

0 commit comments

Comments
 (0)