2024-01-01 14:58:21 -05:00
|
|
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2020-12-07 05:46:39 -05:00
|
|
|
|
|
|
|
// Contains types that can be used to validate and check `99_main_compiler.js`
|
|
|
|
|
2023-03-24 10:35:44 -04:00
|
|
|
import * as _ts from "./dts/typescript.d.ts";
|
2020-12-07 05:46:39 -05:00
|
|
|
|
|
|
|
declare global {
|
|
|
|
namespace ts {
|
|
|
|
var libs: string[];
|
|
|
|
var libMap: Map<string, string>;
|
2022-05-17 10:59:35 -04:00
|
|
|
var base64encode: (host: ts.CompilerHost, input: string) => string;
|
2022-05-31 20:19:18 -04:00
|
|
|
var normalizePath: (path: string) => string;
|
2023-03-24 10:35:44 -04:00
|
|
|
|
2020-12-07 05:46:39 -05:00
|
|
|
interface SourceFile {
|
|
|
|
version?: string;
|
2023-03-24 10:35:44 -04:00
|
|
|
scriptSnapShot?: _ts.IScriptSnapshot;
|
2020-12-07 05:46:39 -05:00
|
|
|
}
|
|
|
|
|
2022-05-31 20:19:18 -04:00
|
|
|
interface CompilerHost {
|
|
|
|
base64encode?: (data: any) => string;
|
|
|
|
}
|
|
|
|
|
2020-12-07 05:46:39 -05:00
|
|
|
interface Performance {
|
|
|
|
enable(): void;
|
|
|
|
getDuration(value: string): number;
|
|
|
|
}
|
|
|
|
|
|
|
|
var performance: Performance;
|
2022-10-21 11:20:18 -04:00
|
|
|
|
2023-03-24 10:35:44 -04:00
|
|
|
function setLocalizedDiagnosticMessages(
|
|
|
|
messages: Record<string, string>,
|
|
|
|
): void;
|
2020-12-07 05:46:39 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
namespace ts {
|
2023-03-24 10:35:44 -04:00
|
|
|
// @ts-ignore allow using an export = here
|
2020-12-07 05:46:39 -05:00
|
|
|
export = _ts;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface Object {
|
|
|
|
// deno-lint-ignore no-explicit-any
|
|
|
|
__proto__: any;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface DenoCore {
|
2022-05-31 20:19:18 -04:00
|
|
|
encode(value: string): Uint8Array;
|
2020-12-07 05:46:39 -05:00
|
|
|
// deno-lint-ignore no-explicit-any
|
2022-08-11 09:56:56 -04:00
|
|
|
ops: Record<string, (...args: unknown[]) => any>;
|
2023-04-30 04:50:24 -04:00
|
|
|
// deno-lint-ignore no-explicit-any
|
|
|
|
asyncOps: Record<string, (...args: unknown[]) => any>;
|
2022-08-11 09:56:56 -04:00
|
|
|
print(msg: string, stderr: boolean): void;
|
2021-02-25 14:06:06 -05:00
|
|
|
registerErrorClass(
|
|
|
|
name: string,
|
|
|
|
Ctor: typeof Error,
|
|
|
|
// deno-lint-ignore no-explicit-any
|
|
|
|
...args: any[]
|
|
|
|
): void;
|
2020-12-07 05:46:39 -05:00
|
|
|
}
|
|
|
|
}
|