2020-01-02 15:13:47 -05:00
|
|
|
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
|
2019-09-12 17:30:04 -04:00
|
|
|
|
|
|
|
// This scopes the `ts` namespace globally, which is where it exists at runtime
|
|
|
|
// when building Deno, but the `typescript/lib/typescript.d.ts` is defined as a
|
|
|
|
// module.
|
|
|
|
|
2019-09-15 18:36:27 -04:00
|
|
|
// Warning! This is a magical import. We don't want to have multiple copies of
|
|
|
|
// typescript.d.ts around the repo, there's already one in
|
|
|
|
// deno_typescript/typescript/lib/typescript.d.ts. Ideally we could simply point
|
|
|
|
// to that in this import specifier, but "cargo package" is very strict and
|
|
|
|
// requires all files to be present in a crate's subtree.
|
2019-09-12 17:30:04 -04:00
|
|
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
2019-09-15 18:36:27 -04:00
|
|
|
import * as ts_ from "$asset$/typescript.d.ts";
|
2019-09-12 17:30:04 -04:00
|
|
|
|
|
|
|
declare global {
|
|
|
|
namespace ts {
|
|
|
|
export = ts_;
|
|
|
|
}
|
2020-02-19 00:34:11 -05:00
|
|
|
|
|
|
|
namespace ts {
|
|
|
|
// this are marked @internal in TypeScript, but we need to access them,
|
|
|
|
// there is a risk these could change in future versions of TypeScript
|
|
|
|
export const libs: string[];
|
|
|
|
export const libMap: Map<string, string>;
|
|
|
|
}
|
2019-09-12 17:30:04 -04:00
|
|
|
}
|