mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 15:04:11 -05:00
parent
4f00218d6d
commit
0162eca15f
4 changed files with 9 additions and 1 deletions
2
Makefile
2
Makefile
|
@ -39,7 +39,7 @@ deno: msg.pb.go $(GO_FILES)
|
|||
go build -o deno ./cmd
|
||||
|
||||
assets.go: dist/main.js
|
||||
cp node_modules/typescript/lib/lib.*d.ts dist/
|
||||
cp node_modules/typescript/lib/*d.ts dist/
|
||||
cp deno.d.ts dist/
|
||||
go-bindata -pkg deno -o assets.go dist/
|
||||
|
||||
|
|
|
@ -130,6 +130,8 @@ export function makeDefine(fileName: string): AmdDefine {
|
|||
return localRequire;
|
||||
} else if (dep === "exports") {
|
||||
return localExports;
|
||||
} else if (dep === "typescript") {
|
||||
return ts;
|
||||
} else if (dep === "deno") {
|
||||
return deno;
|
||||
} else {
|
||||
|
@ -310,6 +312,8 @@ class TypeScriptHost implements ts.LanguageServiceHost {
|
|||
let resolvedFileName;
|
||||
if (name === "deno") {
|
||||
resolvedFileName = resolveModuleName("deno.d.ts", "/$asset$/");
|
||||
} else if (name === "typescript") {
|
||||
resolvedFileName = resolveModuleName("typescript.d.ts", "/$asset$/");
|
||||
} else {
|
||||
resolvedFileName = resolveModuleName(name, containingFile);
|
||||
}
|
||||
|
|
3
testdata/import_typescript.ts
vendored
Normal file
3
testdata/import_typescript.ts
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
import * as ts from "typescript";
|
||||
|
||||
console.log("typescript version", ts.version);
|
1
testdata/import_typescript.ts.out
vendored
Normal file
1
testdata/import_typescript.ts.out
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
typescript version 2.8.3
|
Loading…
Reference in a new issue