Skip to content

Commit

Permalink
close #2994: use deno types for type checking
Browse files Browse the repository at this point in the history
  • Loading branch information
evanw committed Mar 17, 2023
1 parent 4e96d42 commit 1537025
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 2,316 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
/deno/
/esbuild
/github/
/lib/deno/lib.deno.d.ts
/npm/@esbuild/android-arm/esbuild.wasm
/npm/@esbuild/android-arm/wasm_exec_node.js
/npm/@esbuild/android-arm/wasm_exec.js
Expand Down
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,17 @@ test-old-ts: platform-neutral | require/old-ts/node_modules
node-unref-tests: | scripts/node_modules
node scripts/node-unref-tests.js

lib-typecheck: | lib/node_modules
lib-typecheck: lib-typecheck-node lib-typecheck-deno

lib-typecheck-node: | lib/node_modules
cd lib && node_modules/.bin/tsc -noEmit -p tsconfig.json

lib-typecheck-deno: lib/deno/lib.deno.d.ts | lib/node_modules
cd lib && node_modules/.bin/tsc -noEmit -p tsconfig-deno.json

lib/deno/lib.deno.d.ts:
deno types > lib/deno/lib.deno.d.ts

# End-to-end tests
test-e2e: test-e2e-npm test-e2e-pnpm test-e2e-yarn-berry test-e2e-deno

Expand Down
3 changes: 3 additions & 0 deletions lib/deno/external.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
declare module "https://deno.land/x/denoflate@1.2.1/mod.ts" {
export function gunzip(input: Uint8Array): Uint8Array
}

// This is used by "worker.ts"
declare let onmessage: (event: any) => void
Loading

0 comments on commit 1537025

Please sign in to comment.