Skip to content

Commit a4ab07d

Browse files
committed
build: workaround typescript
Build the project first, then import from the build and then do the type check
1 parent 0ff5661 commit a4ab07d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"update-endpoints": "npm-run-all update-endpoints:*",
1515
"update-endpoints:fetch-json": "node scripts/update-endpoints/fetch-json",
1616
"update-endpoints:code": "node scripts/update-endpoints/code",
17-
"validate:ts": "tsc --noEmit --noImplicitAny --target es2020 --esModuleInterop --moduleResolution node test/typescript-validate.ts"
17+
"validate:ts": "npm run build && tsc --noEmit --noImplicitAny --target es2020 --esModuleInterop --moduleResolution node test/typescript-validate.ts"
1818
},
1919
"repository": "github:octokit/plugin-throttling.js",
2020
"author": "Simon Grondin (http://github.com/SGrondin)",

test/typescript-validate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Octokit } from "@octokit/core";
2-
import { throttling } from "../src/index";
2+
import { throttling } from "../pkg";
33
// ************************************************************
44
// THIS CODE IS NOT EXECUTED. IT IS FOR TYPECHECKING ONLY
55
// ************************************************************

0 commit comments

Comments
 (0)