1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-11 18:17:48 -05:00
denoland-deno/cli/tsc/compiler.d.ts
2024-01-01 19:58:21 +00:00

59 lines
1.4 KiB
TypeScript

// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// Contains types that can be used to validate and check `99_main_compiler.js`
import * as _ts from "./dts/typescript.d.ts";
declare global {
namespace ts {
var libs: string[];
var libMap: Map<string, string>;
var base64encode: (host: ts.CompilerHost, input: string) => string;
var normalizePath: (path: string) => string;
interface SourceFile {
version?: string;
scriptSnapShot?: _ts.IScriptSnapshot;
}
interface CompilerHost {
base64encode?: (data: any) => string;
}
interface Performance {
enable(): void;
getDuration(value: string): number;
}
var performance: Performance;
function setLocalizedDiagnosticMessages(
messages: Record<string, string>,
): void;
}
namespace ts {
// @ts-ignore allow using an export = here
export = _ts;
}
interface Object {
// deno-lint-ignore no-explicit-any
__proto__: any;
}
interface DenoCore {
encode(value: string): Uint8Array;
// deno-lint-ignore no-explicit-any
ops: Record<string, (...args: unknown[]) => any>;
// deno-lint-ignore no-explicit-any
asyncOps: Record<string, (...args: unknown[]) => any>;
print(msg: string, stderr: boolean): void;
registerErrorClass(
name: string,
Ctor: typeof Error,
// deno-lint-ignore no-explicit-any
...args: any[]
): void;
}
}