mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Update Harness.compileFiles to use vfs
This commit is contained in:
1 parent
7d08d744e9
commit
8245f6246d
790 files changed
+5079
-4470
No files matched your search
+1
-82
@@ -91,88 +91,7 @@ var languageServiceLibrarySources = filesFromConfig(path.join(serverDirectory, "
|
||||
|
||||
var typesMapOutputPath = path.join(builtLocalDirectory, 'typesMap.json');
|
||||
|
||||
var harnessCoreSources = [
|
||||
"harness.ts",
|
||||
"collections.ts",
|
||||
"vpath.ts",
|
||||
"events.ts",
|
||||
"vfs.ts",
|
||||
"virtualFileSystemWithWatch.ts",
|
||||
"sourceMapRecorder.ts",
|
||||
"harnessLanguageService.ts",
|
||||
"fourslash.ts",
|
||||
"runnerbase.ts",
|
||||
"compilerRunner.ts",
|
||||
"typeWriter.ts",
|
||||
"fourslashRunner.ts",
|
||||
"projectsRunner.ts",
|
||||
"loggedIO.ts",
|
||||
"rwcRunner.ts",
|
||||
"userRunner.ts",
|
||||
"test262Runner.ts",
|
||||
"./parallel/shared.ts",
|
||||
"./parallel/host.ts",
|
||||
"./parallel/worker.ts",
|
||||
"runner.ts"
|
||||
].map(function (f) {
|
||||
return path.join(harnessDirectory, f);
|
||||
});
|
||||
|
||||
var harnessSources = harnessCoreSources.concat([
|
||||
"incrementalParser.ts",
|
||||
"jsDocParsing.ts",
|
||||
"services/colorization.ts",
|
||||
"services/documentRegistry.ts",
|
||||
"services/preProcessFile.ts",
|
||||
"services/patternMatcher.ts",
|
||||
"session.ts",
|
||||
"versionCache.ts",
|
||||
"convertToBase64.ts",
|
||||
"transpile.ts",
|
||||
"reuseProgramStructure.ts",
|
||||
"textStorage.ts",
|
||||
"moduleResolution.ts",
|
||||
"tsconfigParsing.ts",
|
||||
"builder.ts",
|
||||
"commandLineParsing.ts",
|
||||
"configurationExtension.ts",
|
||||
"convertCompilerOptionsFromJson.ts",
|
||||
"convertTypeAcquisitionFromJson.ts",
|
||||
"tsserverProjectSystem.ts",
|
||||
"tscWatchMode.ts",
|
||||
"compileOnSave.ts",
|
||||
"typingsInstaller.ts",
|
||||
"projectErrors.ts",
|
||||
"matchFiles.ts",
|
||||
"initializeTSConfig.ts",
|
||||
"extractConstants.ts",
|
||||
"extractFunctions.ts",
|
||||
"extractRanges.ts",
|
||||
"extractTestHelpers.ts",
|
||||
"printer.ts",
|
||||
"textChanges.ts",
|
||||
"telemetry.ts",
|
||||
"transform.ts",
|
||||
"customTransforms.ts",
|
||||
"programMissingFiles.ts",
|
||||
"symbolWalker.ts",
|
||||
"languageService.ts",
|
||||
"publicApi.ts",
|
||||
"hostNewLineSupport.ts",
|
||||
].map(function (f) {
|
||||
return path.join(unittestsDirectory, f);
|
||||
})).concat([
|
||||
"protocol.ts",
|
||||
"utilities.ts",
|
||||
"scriptVersionCache.ts",
|
||||
"scriptInfo.ts",
|
||||
"project.ts",
|
||||
"typingsCache.ts",
|
||||
"editorServices.ts",
|
||||
"session.ts",
|
||||
].map(function (f) {
|
||||
return path.join(serverDirectory, f);
|
||||
}));
|
||||
var harnessSources = filesFromConfig("./src/harness/tsconfig.json");
|
||||
|
||||
var es2015LibrarySources = [
|
||||
"es2015.core.d.ts",
|
||||
|
||||
@@ -1749,7 +1749,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
function getDiagnosticFileName(diagnostic: Diagnostic): string {
|
||||
return diagnostic.file ? diagnostic.file.fileName : undefined;
|
||||
return diagnostic.file ? diagnostic.file.path : undefined;
|
||||
}
|
||||
|
||||
export function compareDiagnostics(d1: Diagnostic, d2: Diagnostic): Comparison {
|
||||
|
||||
@@ -50,7 +50,8 @@ namespace ts {
|
||||
// JavaScript files are always LanguageVariant.JSX, as JSX syntax is allowed in .js files also.
|
||||
// So for JavaScript files, '.jsx' is only emitted if the input was '.jsx', and JsxEmit.Preserve.
|
||||
// For TypeScript, the only time to emit with a '.jsx' extension, is on JSX input, and JsxEmit.Preserve
|
||||
function getOutputExtension(sourceFile: SourceFile, options: CompilerOptions): Extension {
|
||||
/* @internal */
|
||||
export function getOutputExtension(sourceFile: SourceFile, options: CompilerOptions): Extension {
|
||||
if (options.jsx === JsxEmit.Preserve) {
|
||||
if (isSourceFileJavaScript(sourceFile)) {
|
||||
if (fileExtensionIs(sourceFile.fileName, Extension.Jsx)) {
|
||||
|
||||
@@ -0,0 +1,377 @@
|
||||
/// <reference path="./harness.ts" />
|
||||
/// <reference path="./documents.ts" />
|
||||
/// <reference path="./collections.ts" />
|
||||
/// <reference path="./vpath.ts" />
|
||||
/// <reference path="./vfs.ts" />
|
||||
/// <reference path="./utils.ts" />
|
||||
|
||||
namespace compiler {
|
||||
import TextDocument = documents.TextDocument;
|
||||
import SourceMap = documents.SourceMap;
|
||||
import KeyedCollection = collections.KeyedCollection;
|
||||
import VirtualFileSystem = vfs.VirtualFileSystem;
|
||||
|
||||
export class CompilerHost {
|
||||
public readonly vfs: vfs.VirtualFileSystem;
|
||||
public readonly defaultLibLocation: string;
|
||||
public readonly outputs: TextDocument[] = [];
|
||||
public readonly traces: string[] = [];
|
||||
|
||||
private _setParentNodes: boolean;
|
||||
private _sourceFiles: KeyedCollection<string, ts.SourceFile>;
|
||||
private _newLine: string;
|
||||
private _parseConfigHost: ParseConfigHost;
|
||||
|
||||
constructor(vfs: VirtualFileSystem, options: ts.CompilerOptions, setParentNodes = false) {
|
||||
this.vfs = vfs;
|
||||
this.defaultLibLocation = vfs.metadata.get("defaultLibLocation") || "";
|
||||
this._sourceFiles = new KeyedCollection<string, ts.SourceFile>(this.vfs.pathComparer);
|
||||
this._newLine = options.newLine === ts.NewLineKind.LineFeed ? "\n" : "\r\n";
|
||||
this._setParentNodes = setParentNodes;
|
||||
}
|
||||
|
||||
public get parseConfigHost() {
|
||||
return this._parseConfigHost || (this._parseConfigHost = new ParseConfigHost(this.vfs));
|
||||
}
|
||||
|
||||
public getCurrentDirectory(): string {
|
||||
return this.vfs.currentDirectory;
|
||||
}
|
||||
|
||||
public useCaseSensitiveFileNames(): boolean {
|
||||
return this.vfs.useCaseSensitiveFileNames;
|
||||
}
|
||||
|
||||
public getNewLine(): string {
|
||||
return this._newLine;
|
||||
}
|
||||
|
||||
public getCanonicalFileName(fileName: string): string {
|
||||
return this.vfs.useCaseSensitiveFileNames ? fileName : fileName.toLowerCase();
|
||||
}
|
||||
|
||||
public fileExists(fileName: string): boolean {
|
||||
return this.vfs.fileExists(fileName);
|
||||
}
|
||||
|
||||
public directoryExists(directoryName: string): boolean {
|
||||
return this.vfs.directoryExists(directoryName);
|
||||
}
|
||||
|
||||
public getDirectories(path: string): string[] {
|
||||
const entry = this.vfs.getDirectory(path);
|
||||
return entry ? entry.getDirectories().map(dir => dir.name) : [];
|
||||
}
|
||||
|
||||
public readFile(path: string): string | undefined {
|
||||
const entry = this.vfs.getFile(path);
|
||||
const content = entry && entry.content && utils.removeByteOrderMark(entry.content);
|
||||
return content === undefined ? undefined :
|
||||
vpath.extname(path) === ".json" ? utils.removeComments(content, utils.CommentRemoval.leadingAndTrailing) :
|
||||
content;
|
||||
}
|
||||
|
||||
public writeFile(fileName: string, content: string, writeByteOrderMark: boolean) {
|
||||
// NOTE(rbuckton): Old harness emits "\u00EF\u00BB\u00BF" for UTF8 BOM, but compiler emits "\uFEFF". Compiler is wrong, as "\uFEFF" is a UTF16 BOM.
|
||||
if (writeByteOrderMark) content = "\u00EF\u00BB\u00BF" + content;
|
||||
const entry = this.vfs.addFile(fileName, content, { overwrite: true });
|
||||
if (entry) {
|
||||
const document = new TextDocument(fileName, content);
|
||||
document.meta.set("fileName", fileName);
|
||||
entry.metadata.set("document", document);
|
||||
const index = this.outputs.findIndex(output => this.vfs.pathComparer(document.file, output.file) === 0);
|
||||
if (index < 0) {
|
||||
this.outputs.push(document);
|
||||
}
|
||||
else {
|
||||
this.outputs[index] = document;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public trace(s: string): void {
|
||||
this.traces.push(s);
|
||||
}
|
||||
|
||||
public realpath(path: string): string {
|
||||
const entry = this.vfs.getEntry(path, { followSymlinks: true });
|
||||
return entry && entry.path || path;
|
||||
}
|
||||
|
||||
public getDefaultLibLocation(): string {
|
||||
return vpath.resolve(this.vfs.currentDirectory, this.defaultLibLocation);
|
||||
}
|
||||
|
||||
public getDefaultLibFileName(options: ts.CompilerOptions): string {
|
||||
return vpath.resolve(this.getDefaultLibLocation(), ts.getDefaultLibFileName(options));
|
||||
}
|
||||
|
||||
public getSourceFile(fileName: string, languageVersion: number): ts.SourceFile | undefined {
|
||||
const canonicalFileName = this.getCanonicalFileName(vpath.resolve(this.vfs.currentDirectory, fileName));
|
||||
const existing = this._sourceFiles.get(canonicalFileName);
|
||||
if (existing) return existing;
|
||||
const file = this.vfs.getFile(canonicalFileName);
|
||||
if (file) {
|
||||
let content = file.content;
|
||||
if (content !== undefined) {
|
||||
content = utils.removeByteOrderMark(content);
|
||||
|
||||
// We cache and reuse source files for files we know shouldn't change.
|
||||
const shouldCache = vpath.isDefaultLibrary(fileName) ||
|
||||
vpath.beneath("/.ts", file.path, !this.vfs.useCaseSensitiveFileNames) ||
|
||||
vpath.beneath("/.lib", file.path, !this.vfs.useCaseSensitiveFileNames);
|
||||
|
||||
const cacheKey = shouldCache && `SourceFile[languageVersion=${languageVersion},setParentNodes=${this._setParentNodes}]`;
|
||||
if (cacheKey) {
|
||||
const sourceFileFromMetadata = file.metadata.get(cacheKey) as ts.SourceFile | undefined;
|
||||
if (sourceFileFromMetadata) {
|
||||
this._sourceFiles.set(canonicalFileName, sourceFileFromMetadata);
|
||||
return sourceFileFromMetadata;
|
||||
}
|
||||
}
|
||||
|
||||
const parsed = ts.createSourceFile(fileName, content, languageVersion, this._setParentNodes);
|
||||
this._sourceFiles.set(canonicalFileName, parsed);
|
||||
|
||||
if (cacheKey) {
|
||||
// store the cached source file on the unshadowed file.
|
||||
let rootFile = file;
|
||||
while (rootFile.shadowRoot) rootFile = rootFile.shadowRoot;
|
||||
rootFile.metadata.set(cacheKey, parsed);
|
||||
}
|
||||
|
||||
return parsed;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export class ParseConfigHost {
|
||||
public readonly vfs: VirtualFileSystem;
|
||||
|
||||
constructor(vfs: VirtualFileSystem) {
|
||||
this.vfs = vfs;
|
||||
}
|
||||
|
||||
public get useCaseSensitiveFileNames() {
|
||||
return this.vfs.useCaseSensitiveFileNames;
|
||||
}
|
||||
|
||||
public readDirectory(path: string, extensions: string[], excludes: string[], includes: string[], depth: number): string[] {
|
||||
return ts.matchFiles(
|
||||
path,
|
||||
extensions,
|
||||
excludes,
|
||||
includes,
|
||||
this.vfs.useCaseSensitiveFileNames,
|
||||
this.vfs.currentDirectory,
|
||||
depth,
|
||||
path => this.vfs.getAccessibleFileSystemEntries(path));
|
||||
}
|
||||
|
||||
public fileExists(path: string) {
|
||||
return this.vfs.fileExists(path);
|
||||
}
|
||||
|
||||
public readFile(path: string) {
|
||||
return this.vfs.readFile(path);
|
||||
}
|
||||
}
|
||||
|
||||
export interface Project {
|
||||
file: string;
|
||||
config?: ts.ParsedCommandLine;
|
||||
errors?: ts.Diagnostic[];
|
||||
}
|
||||
|
||||
export function readProject(host: ParseConfigHost, project: string | undefined, existingOptions?: ts.CompilerOptions): Project | undefined {
|
||||
if (project) {
|
||||
project = host.vfs.stringComparer(vpath.basename(project), "tsconfig.json") === 0 ? project :
|
||||
vpath.combine(project, "tsconfig.json");
|
||||
}
|
||||
else {
|
||||
const dir = host.vfs.getDirectory(host.vfs.currentDirectory);
|
||||
const projectFile = dir && dir.findFile("tsconfig.json", "ancestors-or-self");
|
||||
project = projectFile && projectFile.path;
|
||||
}
|
||||
|
||||
if (project) {
|
||||
// TODO(rbuckton): Do we need to resolve this? Resolving breaks projects tests.
|
||||
// project = vpath.resolve(host.vfs.currentDirectory, project);
|
||||
|
||||
// read the config file
|
||||
const readResult = ts.readConfigFile(project, path => host.readFile(path));
|
||||
if (readResult.error) {
|
||||
return { file: project, errors: [readResult.error] };
|
||||
}
|
||||
|
||||
// parse the config file
|
||||
const config = ts.parseJsonConfigFileContent(readResult.config, host, vpath.dirname(project), existingOptions);
|
||||
return { file: project, errors: config.errors, config };
|
||||
}
|
||||
}
|
||||
|
||||
export interface CompilationOutput {
|
||||
readonly input: TextDocument;
|
||||
readonly js: TextDocument | undefined;
|
||||
readonly dts: TextDocument | undefined;
|
||||
readonly map: TextDocument | undefined;
|
||||
}
|
||||
|
||||
export class CompilationResult {
|
||||
public readonly host: CompilerHost;
|
||||
public readonly program: ts.Program | undefined;
|
||||
public readonly result: ts.EmitResult | undefined;
|
||||
public readonly options: ts.CompilerOptions;
|
||||
public readonly diagnostics: ts.Diagnostic[];
|
||||
public readonly js: KeyedCollection<string, TextDocument>;
|
||||
public readonly dts: KeyedCollection<string, TextDocument>;
|
||||
public readonly maps: KeyedCollection<string, TextDocument>;
|
||||
|
||||
private _inputs: TextDocument[] = [];
|
||||
private _inputsAndOutputs: KeyedCollection<string, CompilationOutput>;
|
||||
|
||||
constructor(host: CompilerHost, options: ts.CompilerOptions, program: ts.Program | undefined, result: ts.EmitResult | undefined, diagnostics: ts.Diagnostic[]) {
|
||||
this.host = host;
|
||||
this.program = program;
|
||||
this.result = result;
|
||||
this.diagnostics = diagnostics;
|
||||
this.options = program ? program.getCompilerOptions() : options;
|
||||
|
||||
// collect outputs
|
||||
this.js = new KeyedCollection<string, TextDocument>(this.vfs.pathComparer);
|
||||
this.dts = new KeyedCollection<string, TextDocument>(this.vfs.pathComparer);
|
||||
this.maps = new KeyedCollection<string, TextDocument>(this.vfs.pathComparer);
|
||||
for (const document of this.host.outputs) {
|
||||
if (vpath.isJavaScript(document.file)) {
|
||||
this.js.set(document.file, document);
|
||||
}
|
||||
else if (vpath.isDeclaration(document.file)) {
|
||||
this.dts.set(document.file, document);
|
||||
}
|
||||
else if (vpath.isSourceMap(document.file)) {
|
||||
this.maps.set(document.file, document);
|
||||
}
|
||||
}
|
||||
|
||||
// correlate inputs and outputs
|
||||
this._inputsAndOutputs = new KeyedCollection<string, CompilationOutput>(this.vfs.pathComparer);
|
||||
if (program) {
|
||||
for (const sourceFile of program.getSourceFiles()) {
|
||||
if (sourceFile) {
|
||||
const input = new TextDocument(sourceFile.fileName, sourceFile.text);
|
||||
this._inputs.push(input);
|
||||
if (!vpath.isDeclaration(sourceFile.fileName)) {
|
||||
const outputs = {
|
||||
input,
|
||||
js: this.js.get(this.getOutputPath(sourceFile.fileName, ts.getOutputExtension(sourceFile, this.options))),
|
||||
dts: this.dts.get(this.getOutputPath(sourceFile.fileName, ".d.ts", this.options.declarationDir)),
|
||||
map: this.maps.get(this.getOutputPath(sourceFile.fileName, ts.getOutputExtension(sourceFile, this.options) + ".map"))
|
||||
};
|
||||
|
||||
this._inputsAndOutputs.set(sourceFile.fileName, outputs);
|
||||
if (outputs.js) this._inputsAndOutputs.set(outputs.js.file, outputs);
|
||||
if (outputs.dts) this._inputsAndOutputs.set(outputs.dts.file, outputs);
|
||||
if (outputs.map) this._inputsAndOutputs.set(outputs.map.file, outputs);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public get vfs() {
|
||||
return this.host.vfs;
|
||||
}
|
||||
|
||||
public get inputs(): ReadonlyArray<TextDocument> {
|
||||
return this._inputs;
|
||||
}
|
||||
|
||||
public get outputs(): ReadonlyArray<TextDocument> {
|
||||
return this.host.outputs;
|
||||
}
|
||||
|
||||
public get traces(): ReadonlyArray<string> {
|
||||
return this.host.traces;
|
||||
}
|
||||
|
||||
public get emitSkipped(): boolean {
|
||||
return this.result && this.result.emitSkipped || false;
|
||||
}
|
||||
|
||||
public get singleFile(): boolean {
|
||||
return !!this.options.outFile || !!this.options.out;
|
||||
}
|
||||
|
||||
public get commonSourceDirectory(): string {
|
||||
const common = this.program && this.program.getCommonSourceDirectory() || "";
|
||||
return common && vpath.combine(this.vfs.currentDirectory, common);
|
||||
}
|
||||
|
||||
public getInputsAndOutputs(path: string): CompilationOutput | undefined {
|
||||
return this._inputsAndOutputs.get(vpath.resolve(this.vfs.currentDirectory, path));
|
||||
}
|
||||
|
||||
public getInput(path: string): TextDocument | undefined {
|
||||
const outputs = this.getInputsAndOutputs(path);
|
||||
return outputs && outputs.input;
|
||||
}
|
||||
|
||||
public getOutput(path: string, kind: "js" | "dts" | "map"): TextDocument | undefined {
|
||||
const outputs = this.getInputsAndOutputs(path);
|
||||
return outputs && outputs[kind];
|
||||
}
|
||||
|
||||
public getSourceMap(path: string): SourceMap | undefined {
|
||||
if (this.options.noEmit || vpath.isDeclaration(path)) return undefined;
|
||||
if (this.options.inlineSourceMap) {
|
||||
const document = this.getOutput(path, "js");
|
||||
return document && SourceMap.fromSource(document.text);
|
||||
}
|
||||
if (this.options.sourceMap) {
|
||||
const document = this.getOutput(path, "map");
|
||||
return document && new SourceMap(document.file, document.text);
|
||||
}
|
||||
}
|
||||
|
||||
public getOutputPath(path: string, ext: string, outDir: string | undefined = this.options.outDir) {
|
||||
if (outDir) {
|
||||
path = vpath.resolve(this.vfs.currentDirectory, path);
|
||||
const common = this.commonSourceDirectory;
|
||||
if (!common) return vpath.changeExtension(path, ext);
|
||||
path = vpath.relative(common, path, !this.vfs.useCaseSensitiveFileNames);
|
||||
path = vpath.combine(vpath.resolve(this.vfs.currentDirectory, outDir), path);
|
||||
return vpath.changeExtension(path, ext);
|
||||
}
|
||||
const outFile = vpath.resolve(this.vfs.currentDirectory, this.options.outFile || this.options.out || path);
|
||||
return vpath.changeExtension(outFile, ext);
|
||||
}
|
||||
}
|
||||
|
||||
export function compileFiles(host: CompilerHost, rootFiles: string[] | undefined, compilerOptions: ts.CompilerOptions) {
|
||||
// establish defaults (aligns with old harness)
|
||||
if (compilerOptions.project || !rootFiles || rootFiles.length === 0) {
|
||||
const project = readProject(host.parseConfigHost, compilerOptions.project, compilerOptions);
|
||||
if (project) {
|
||||
if (project.errors && project.errors.length > 0) {
|
||||
return new CompilationResult(host, compilerOptions, /*program*/ undefined, /*result*/ undefined, project.errors);
|
||||
}
|
||||
if (project.config) {
|
||||
rootFiles = project.config.fileNames;
|
||||
compilerOptions = project.config.options;
|
||||
}
|
||||
}
|
||||
delete compilerOptions.project;
|
||||
}
|
||||
|
||||
if (compilerOptions.target === undefined) compilerOptions.target = ts.ScriptTarget.ES3;
|
||||
if (compilerOptions.newLine === undefined) compilerOptions.newLine = ts.NewLineKind.CarriageReturnLineFeed;
|
||||
if (compilerOptions.skipDefaultLibCheck === undefined) compilerOptions.skipDefaultLibCheck = true;
|
||||
if (compilerOptions.noErrorTruncation === undefined) compilerOptions.noErrorTruncation = true;
|
||||
|
||||
const program = ts.createProgram(rootFiles || [], compilerOptions, host);
|
||||
const emitResult = program.emit();
|
||||
const errors = ts.getPreEmitDiagnostics(program);
|
||||
return new CompilationResult(host, compilerOptions, program, emitResult, errors);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,10 @@
|
||||
/// <reference path="harness.ts" />
|
||||
/// <reference path="runnerbase.ts" />
|
||||
/// <reference path="typeWriter.ts" />
|
||||
/// <reference path="./vpath.ts" />
|
||||
/// <reference path="./vfs.ts" />
|
||||
/// <reference path="./compiler.ts" />
|
||||
/// <reference path="./documents.ts" />
|
||||
|
||||
const enum CompilerTestType {
|
||||
Conformance,
|
||||
@@ -65,7 +69,7 @@ class CompilerBaselineRunner extends RunnerBase {
|
||||
let otherFiles: Harness.Compiler.TestFile[];
|
||||
|
||||
before(() => {
|
||||
justName = fileName.replace(/^.*[\\\/]/, ""); // strips the fileName from the path.
|
||||
justName = vpath.basename(fileName);
|
||||
const content = Harness.IO.readFile(fileName);
|
||||
const rootDir = fileName.indexOf("conformance") === -1 ? "tests/cases/compiler/" : ts.getDirectoryPath(fileName) + "/";
|
||||
const testCaseContent = Harness.TestCaseParser.makeUnitsFromTest(content, fileName, rootDir);
|
||||
@@ -141,7 +145,7 @@ class CompilerBaselineRunner extends RunnerBase {
|
||||
it (`Correct module resolution tracing for ${fileName}`, () => {
|
||||
if (options.traceResolution) {
|
||||
Harness.Baseline.runBaseline(justName.replace(/\.tsx?$/, ".trace.json"), () => {
|
||||
return JSON.stringify(result.traceResults || [], undefined, 4);
|
||||
return utils.removeTestPathPrefixes(JSON.stringify(result.traceResults || [], undefined, 4));
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -150,7 +154,7 @@ class CompilerBaselineRunner extends RunnerBase {
|
||||
it("Correct sourcemap content for " + fileName, () => {
|
||||
if (options.sourceMap || options.inlineSourceMap) {
|
||||
Harness.Baseline.runBaseline(justName.replace(/\.tsx?$/, ".sourcemap.txt"), () => {
|
||||
const record = result.getSourceMapRecord();
|
||||
const record = utils.removeTestPathPrefixes(result.getSourceMapRecord());
|
||||
if ((options.noEmitOnError && result.errors.length !== 0) || record === undefined) {
|
||||
// Because of the noEmitOnError option no files are created. We need to return null because baselining isn't required.
|
||||
/* tslint:disable:no-null-keyword */
|
||||
@@ -222,4 +226,4 @@ class CompilerBaselineRunner extends RunnerBase {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,169 @@
|
||||
/// <reference path="harness.ts" />
|
||||
|
||||
namespace documents {
|
||||
export class TextDocument {
|
||||
public readonly meta: Map<string, string>;
|
||||
public readonly file: string;
|
||||
public readonly text: string;
|
||||
|
||||
private _lineStarts: number[] | undefined;
|
||||
|
||||
constructor(file: string, content: string, meta?: Map<string, string>) {
|
||||
this.file = file;
|
||||
this.text = content;
|
||||
this.meta = meta || new Map<string, string>();
|
||||
}
|
||||
|
||||
public get lineStarts(): number[] {
|
||||
return this._lineStarts || (this._lineStarts = ts.computeLineStarts(this.text));
|
||||
}
|
||||
}
|
||||
|
||||
export interface RawSourceMap {
|
||||
version: number;
|
||||
file: string;
|
||||
sourceRoot?: string;
|
||||
sources: string[];
|
||||
sourcesContent?: string[];
|
||||
names: string[];
|
||||
mappings: string;
|
||||
}
|
||||
|
||||
export interface Mapping {
|
||||
mappingIndex: number;
|
||||
emittedLine: number;
|
||||
emittedColumn: number;
|
||||
sourceIndex: number;
|
||||
sourceLine: number;
|
||||
sourceColumn: number;
|
||||
nameIndex?: number;
|
||||
}
|
||||
|
||||
const mappingRegExp = /([A-Za-z0-9+/]+),?|(;)|./g;
|
||||
const sourceMappingURLRegExp = /^\/\/[#@]\s*sourceMappingURL\s*=\s*(.*?)\s*$/mig;
|
||||
const dataURLRegExp = /^data:application\/json;base64,([a-z0-9+/=]+)$/i;
|
||||
|
||||
export class SourceMap {
|
||||
public readonly raw: RawSourceMap;
|
||||
public readonly mapFile: string | undefined;
|
||||
public readonly version: number;
|
||||
public readonly file: string;
|
||||
public readonly sourceRoot: string | undefined;
|
||||
public readonly sources: ReadonlyArray<string> = [];
|
||||
public readonly sourcesContent: ReadonlyArray<string> | undefined;
|
||||
public readonly mappings: ReadonlyArray<Mapping> = [];
|
||||
public readonly names: ReadonlyArray<string> | undefined;
|
||||
|
||||
private _emittedLineMappings: Mapping[][] = [];
|
||||
private _sourceLineMappings: Mapping[][][] = [];
|
||||
|
||||
constructor(mapFile: string | undefined, data: string | RawSourceMap) {
|
||||
this.raw = typeof data === "string" ? JSON.parse(data) as RawSourceMap : data;
|
||||
this.mapFile = mapFile;
|
||||
this.version = this.raw.version;
|
||||
this.file = this.raw.file;
|
||||
this.sourceRoot = this.raw.sourceRoot;
|
||||
this.sources = this.raw.sources;
|
||||
this.sourcesContent = this.raw.sourcesContent;
|
||||
this.names = this.raw.names;
|
||||
|
||||
// populate mappings
|
||||
const mappings: Mapping[] = [];
|
||||
let emittedLine = 0;
|
||||
let emittedColumn = 0;
|
||||
let sourceIndex = 0;
|
||||
let sourceLine = 0;
|
||||
let sourceColumn = 0;
|
||||
let nameIndex = 0;
|
||||
let match: RegExpExecArray | null;
|
||||
while (match = mappingRegExp.exec(this.raw.mappings)) {
|
||||
if (match[1]) {
|
||||
const segment = decodeVLQ(match[1]);
|
||||
if (segment.length !== 1 && segment.length !== 4 && segment.length !== 5) {
|
||||
throw new Error("Invalid VLQ");
|
||||
}
|
||||
|
||||
emittedColumn += segment[0];
|
||||
if (segment.length >= 4) {
|
||||
sourceIndex += segment[1];
|
||||
sourceLine += segment[2];
|
||||
sourceColumn += segment[3];
|
||||
}
|
||||
|
||||
const mapping: Mapping = { mappingIndex: mappings.length, emittedLine, emittedColumn, sourceIndex, sourceLine, sourceColumn };
|
||||
if (segment.length === 5) {
|
||||
nameIndex += segment[4];
|
||||
mapping.nameIndex = nameIndex;
|
||||
}
|
||||
|
||||
mappings.push(mapping);
|
||||
|
||||
const mappingsForEmittedLine = this._emittedLineMappings[mapping.emittedLine] || (this._emittedLineMappings[mapping.emittedLine] = []);
|
||||
mappingsForEmittedLine.push(mapping);
|
||||
|
||||
const mappingsForSource = this._sourceLineMappings[mapping.sourceIndex] || (this._sourceLineMappings[mapping.sourceIndex] = []);
|
||||
const mappingsForSourceLine = mappingsForSource[mapping.sourceLine] || (mappingsForSource[mapping.sourceLine] = []);
|
||||
mappingsForSourceLine.push(mapping);
|
||||
}
|
||||
else if (match[2]) {
|
||||
emittedLine++;
|
||||
emittedColumn = 0;
|
||||
}
|
||||
else {
|
||||
throw new Error(`Unrecognized character '${match[0]}'.`);
|
||||
}
|
||||
}
|
||||
|
||||
this.mappings = mappings;
|
||||
}
|
||||
|
||||
public static getUrl(text: string) {
|
||||
let match: RegExpExecArray | null;
|
||||
let lastMatch: RegExpExecArray | undefined;
|
||||
while (match = sourceMappingURLRegExp.exec(text)) {
|
||||
lastMatch = match;
|
||||
}
|
||||
return lastMatch ? lastMatch[1] : undefined;
|
||||
}
|
||||
|
||||
public static fromUrl(url: string) {
|
||||
const match = dataURLRegExp.exec(url);
|
||||
return match ? new SourceMap(/*mapFile*/ undefined, new Buffer(match[1], "base64").toString("utf8")) : undefined;
|
||||
}
|
||||
|
||||
public static fromSource(text: string) {
|
||||
const url = this.getUrl(text);
|
||||
return url && this.fromUrl(url);
|
||||
}
|
||||
|
||||
public getMappingsForEmittedLine(emittedLine: number): ReadonlyArray<Mapping> | undefined {
|
||||
return this._emittedLineMappings[emittedLine];
|
||||
}
|
||||
|
||||
public getMappingsForSourceLine(sourceIndex: number, sourceLine: number): ReadonlyArray<Mapping> | undefined {
|
||||
const mappingsForSource = this._sourceLineMappings[sourceIndex];
|
||||
return mappingsForSource && mappingsForSource[sourceLine];
|
||||
}
|
||||
}
|
||||
|
||||
const base64Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||
|
||||
export function decodeVLQ(text: string) {
|
||||
const vlq: number[] = [];
|
||||
let shift = 0;
|
||||
let value = 0;
|
||||
for (let i = 0; i < text.length; i++) {
|
||||
const currentByte = base64Chars.indexOf(text.charAt(i));
|
||||
value += (currentByte & 31) << shift;
|
||||
if ((currentByte & 32) === 0) {
|
||||
vlq.push(value & 1 ? -(value >>> 1) : value >>> 1);
|
||||
shift = 0;
|
||||
value = 0;
|
||||
}
|
||||
else {
|
||||
shift += 5;
|
||||
}
|
||||
}
|
||||
return vlq;
|
||||
}
|
||||
}
|
||||
@@ -10,11 +10,11 @@ namespace events {
|
||||
|
||||
export interface EventEmitter {
|
||||
on(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
once: this["on"];
|
||||
addListener: this["on"];
|
||||
prependListener: this["on"];
|
||||
prependOnceListener: this["on"];
|
||||
removeListener: this["on"];
|
||||
once(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
addListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
removeAllListeners(event?: string | symbol): this;
|
||||
setMaxListeners(n: number): this;
|
||||
getMaxListeners(): number;
|
||||
|
||||
+38
-53
@@ -957,6 +957,10 @@ namespace Harness {
|
||||
}
|
||||
}
|
||||
|
||||
if (Harness.IO.tryEnableSourceMapsForHost && /^development$/i.test(Harness.IO.getEnvironmentVariable("NODE_ENV"))) {
|
||||
Harness.IO.tryEnableSourceMapsForHost();
|
||||
}
|
||||
|
||||
namespace Harness {
|
||||
export const libFolder = "built/local/";
|
||||
const tcServicesFileName = ts.combinePaths(libFolder, Utils.getExecutionEnvironment() === Utils.ExecutionEnvironment.Browser ? "typescriptServicesInBrowserTest.js" : "typescriptServices.js");
|
||||
@@ -1333,7 +1337,7 @@ namespace Harness {
|
||||
options.skipDefaultLibCheck = typeof options.skipDefaultLibCheck === "undefined" ? true : options.skipDefaultLibCheck;
|
||||
|
||||
if (typeof currentDirectory === "undefined") {
|
||||
currentDirectory = Harness.IO.getCurrentDirectory();
|
||||
currentDirectory = "/.src";
|
||||
}
|
||||
|
||||
// Parse settings
|
||||
@@ -1345,56 +1349,44 @@ namespace Harness {
|
||||
}
|
||||
|
||||
const useCaseSensitiveFileNames = options.useCaseSensitiveFileNames !== undefined ? options.useCaseSensitiveFileNames : Harness.IO.useCaseSensitiveFileNames();
|
||||
const programFiles: TestFile[] = inputFiles.slice();
|
||||
const programFileNames = inputFiles.map(file => file.unitName);
|
||||
|
||||
// Files from built\local that are requested by test "@includeBuiltFiles" to be in the context.
|
||||
// Treat them as library files, so include them in build, but not in baselines.
|
||||
if (options.includeBuiltFile) {
|
||||
const builtFileName = ts.combinePaths(libFolder, options.includeBuiltFile);
|
||||
const builtFile: TestFile = {
|
||||
unitName: builtFileName,
|
||||
content: normalizeLineEndings(IO.readFile(builtFileName), Harness.IO.newLine()),
|
||||
};
|
||||
programFiles.push(builtFile);
|
||||
programFileNames.push(vpath.combine("/.ts/", options.includeBuiltFile));
|
||||
}
|
||||
|
||||
const fileOutputs: GeneratedFile[] = [];
|
||||
|
||||
// Files from tests\lib that are requested by "@libFiles"
|
||||
if (options.libFiles) {
|
||||
for (const fileName of options.libFiles.split(",")) {
|
||||
const libFileName = "tests/lib/" + fileName;
|
||||
// Content is undefined here because in createCompilerHost we will create sourceFile for the lib file and cache the result
|
||||
programFiles.push({ unitName: libFileName, content: undefined });
|
||||
programFileNames.push(vpath.combine("/.lib/", fileName));
|
||||
}
|
||||
}
|
||||
|
||||
const compilation = compiler.compileFiles(
|
||||
new compiler.CompilerHost(
|
||||
vfs.VirtualFileSystem.createFromTestFiles(
|
||||
{ useCaseSensitiveFileNames, currentDirectory },
|
||||
inputFiles.concat(otherFiles),
|
||||
{ overwrite: true }
|
||||
),
|
||||
options
|
||||
),
|
||||
programFileNames,
|
||||
options);
|
||||
|
||||
const programFileNames = programFiles.map(file => file.unitName);
|
||||
const fileOutputs = compilation.outputs ? compilation.outputs.map(output => (<GeneratedFile>{
|
||||
fileName: output.file,
|
||||
code: utils.removeByteOrderMark(output.text),
|
||||
writeByteOrderMark: utils.getByteOrderMarkLength(output.text) > 0
|
||||
})) : [];
|
||||
|
||||
const compilerHost = createCompilerHost(
|
||||
programFiles.concat(otherFiles),
|
||||
(fileName, code, writeByteOrderMark) => fileOutputs.push({ fileName, code, writeByteOrderMark }),
|
||||
options.target,
|
||||
useCaseSensitiveFileNames,
|
||||
currentDirectory,
|
||||
options.newLine,
|
||||
options.libFiles);
|
||||
|
||||
let traceResults: string[];
|
||||
if (options.traceResolution) {
|
||||
traceResults = [];
|
||||
compilerHost.trace = text => traceResults.push(text);
|
||||
}
|
||||
else {
|
||||
compilerHost.directoryExists = () => true; // This only visibly affects resolution traces, so to save time we always return true where possible
|
||||
}
|
||||
const program = ts.createProgram(programFileNames, options, compilerHost);
|
||||
|
||||
const emitResult = program.emit();
|
||||
|
||||
const errors = ts.getPreEmitDiagnostics(program);
|
||||
|
||||
const result = new CompilerResult(fileOutputs, errors, program, Harness.IO.getCurrentDirectory(), emitResult.sourceMaps, traceResults);
|
||||
const traceResults = compilation.traces && compilation.traces.slice();
|
||||
const program = compilation.program;
|
||||
const emitResult = compilation.result;
|
||||
const errors = compilation.diagnostics;
|
||||
const result = new CompilerResult(fileOutputs, errors, program, compilation.vfs.currentDirectory, emitResult.sourceMaps, traceResults);
|
||||
return { result, options };
|
||||
}
|
||||
|
||||
@@ -1479,14 +1471,6 @@ namespace Harness {
|
||||
return { declInputFiles, declOtherFiles, declResult: output.result };
|
||||
}
|
||||
|
||||
function normalizeLineEndings(text: string, lineEnding: string): string {
|
||||
let normalized = text.replace(/\r\n?/g, "\n");
|
||||
if (lineEnding !== "\n") {
|
||||
normalized = normalized.replace(/\n/g, lineEnding);
|
||||
}
|
||||
return normalized;
|
||||
}
|
||||
|
||||
export function minimalDiagnosticsToString(diagnostics: ReadonlyArray<ts.Diagnostic>, pretty?: boolean) {
|
||||
const host = { getCanonicalFileName, getCurrentDirectory: () => "", getNewLine: () => Harness.IO.newLine() };
|
||||
return (pretty ? ts.formatDiagnosticsWithColorAndContext : ts.formatDiagnostics)(diagnostics, host);
|
||||
@@ -1524,7 +1508,7 @@ namespace Harness {
|
||||
function outputErrorText(error: ts.Diagnostic) {
|
||||
const message = ts.flattenDiagnosticMessageText(error.messageText, Harness.IO.newLine());
|
||||
|
||||
const errLines = RunnerBase.removeFullPaths(message)
|
||||
const errLines = utils.removeTestPathPrefixes(message)
|
||||
.split("\n")
|
||||
.map(s => s.length > 0 && s.charAt(s.length - 1) === "\r" ? s.substr(0, s.length - 1) : s)
|
||||
.filter(s => s.length > 0)
|
||||
@@ -1542,7 +1526,7 @@ namespace Harness {
|
||||
}
|
||||
}
|
||||
|
||||
yield [diagnosticSummaryMarker, minimalDiagnosticsToString(diagnostics, pretty) + Harness.IO.newLine() + Harness.IO.newLine(), diagnostics.length];
|
||||
yield [diagnosticSummaryMarker, utils.removeTestPathPrefixes(minimalDiagnosticsToString(diagnostics, pretty)) + Harness.IO.newLine() + Harness.IO.newLine(), diagnostics.length];
|
||||
|
||||
// Report global errors
|
||||
const globalErrors = diagnostics.filter(err => !err.file);
|
||||
@@ -1557,7 +1541,7 @@ namespace Harness {
|
||||
// Filter down to the errors in the file
|
||||
const fileErrors = diagnostics.filter(e => {
|
||||
const errFn = e.file;
|
||||
return errFn && errFn.fileName === inputFile.unitName;
|
||||
return errFn && utils.removeTestPathPrefixes(errFn.fileName) === utils.removeTestPathPrefixes(inputFile.unitName);
|
||||
});
|
||||
|
||||
|
||||
@@ -1774,7 +1758,7 @@ namespace Harness {
|
||||
}
|
||||
typeLines += "\r\n";
|
||||
}
|
||||
yield [checkDuplicatedFileName(unitName, dupeCase), typeLines];
|
||||
yield [checkDuplicatedFileName(unitName, dupeCase), utils.removeTestPathPrefixes(typeLines)];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1866,8 +1850,8 @@ namespace Harness {
|
||||
}
|
||||
|
||||
function fileOutput(file: GeneratedFile, harnessSettings: Harness.TestCaseParser.CompilerSettings): string {
|
||||
const fileName = harnessSettings.fullEmitPaths ? file.fileName : ts.getBaseFileName(file.fileName);
|
||||
return "//// [" + fileName + "]\r\n" + getByteOrderMarkText(file) + file.code;
|
||||
const fileName = harnessSettings.fullEmitPaths ? utils.removeTestPathPrefixes(file.fileName) : ts.getBaseFileName(file.fileName);
|
||||
return "//// [" + fileName + "]\r\n" + getByteOrderMarkText(file) + utils.removeTestPathPrefixes(file.code);
|
||||
}
|
||||
|
||||
export function collateOutputs(outputFiles: Harness.Compiler.GeneratedFile[]): string {
|
||||
@@ -2325,7 +2309,8 @@ namespace Harness {
|
||||
}
|
||||
|
||||
export function isBuiltFile(filePath: string): boolean {
|
||||
return filePath.indexOf(Harness.libFolder) === 0;
|
||||
return filePath.indexOf(Harness.libFolder) === 0 ||
|
||||
filePath.indexOf("/.ts/") === 0;
|
||||
}
|
||||
|
||||
export function getDefaultLibraryFile(io: Harness.IO): Harness.Compiler.TestFile {
|
||||
|
||||
@@ -66,10 +66,6 @@ function createRunner(kind: TestRunnerKind): RunnerBase {
|
||||
ts.Debug.fail(`Unknown runner kind ${kind}`);
|
||||
}
|
||||
|
||||
if (Harness.IO.tryEnableSourceMapsForHost && /^development$/i.test(Harness.IO.getEnvironmentVariable("NODE_ENV"))) {
|
||||
Harness.IO.tryEnableSourceMapsForHost();
|
||||
}
|
||||
|
||||
// users can define tests to run in mytest.config that will override cmd line args, otherwise use cmd line args (test.config), otherwise no options
|
||||
|
||||
const mytestconfigFileName = "mytest.config";
|
||||
|
||||
@@ -82,6 +82,16 @@
|
||||
"../services/codefixes/disableJsDiagnostics.ts",
|
||||
|
||||
"harness.ts",
|
||||
|
||||
"utils.ts",
|
||||
"events.ts",
|
||||
"collections.ts",
|
||||
"documents.ts",
|
||||
"vpath.ts",
|
||||
"vfs.ts",
|
||||
"compiler.ts",
|
||||
|
||||
"virtualFileSystemWithWatch.ts",
|
||||
"sourceMapRecorder.ts",
|
||||
"harnessLanguageService.ts",
|
||||
"fourslash.ts",
|
||||
@@ -98,11 +108,6 @@
|
||||
"./parallel/host.ts",
|
||||
"./parallel/worker.ts",
|
||||
"runner.ts",
|
||||
"collections.ts",
|
||||
"vpath.ts",
|
||||
"events.ts",
|
||||
"vfs.ts",
|
||||
"virtualFileSystemWithWatch.ts",
|
||||
"../server/protocol.ts",
|
||||
"../server/session.ts",
|
||||
"../server/client.ts",
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
namespace utils {
|
||||
export function getByteOrderMarkLength(text: string) {
|
||||
if (text.length >= 2) {
|
||||
const ch0 = text.charCodeAt(0);
|
||||
const ch1 = text.charCodeAt(1);
|
||||
if ((ch0 === 0xff && ch1 === 0xfe) ||
|
||||
(ch0 === 0xfe && ch1 === 0xff)) {
|
||||
return 2;
|
||||
}
|
||||
if (text.length >= 3 && ch0 === 0xef && ch1 === 0xbb && text.charCodeAt(2) === 0xbf) {
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
export function removeByteOrderMark(text: string) {
|
||||
const length = getByteOrderMarkLength(text);
|
||||
return length ? text.slice(length) : text;
|
||||
}
|
||||
|
||||
const leadingCommentRegExp = /^(\s*\/\*[^]*?\*\/\s*|\s*\/\/[^\r\n\u2028\u2029]*[\r\n\u2028\u2029]*)+/;
|
||||
const trailingCommentRegExp = /(\s*\/\*[^]*?\*\/\s*|\s*\/\/[^\r\n\u2028\u2029]*[\r\n\u2028\u2029]*)+$/;
|
||||
const leadingAndTrailingCommentRegExp = /^(\s*\/\*[^]*?\*\/\s*|\s*\/\/[^\r\n\u2028\u2029]*[\r\n\u2028\u2029]*)+|(\s*\/\*[^]*?\*\/\s*|\s*\/\/[^\r\n\u2028\u2029]*[\r\n\u2028\u2029]*)+$/g;
|
||||
const allCommentRegExp = /(['"])(?:(?!\1).|\\[^])*\1|(\/\*[^]*?\*\/|\/\/[^\r\n\u2028\u2029]*[\r\n\u2028\u2029]*)/g;
|
||||
|
||||
export const enum CommentRemoval {
|
||||
leading,
|
||||
trailing,
|
||||
leadingAndTrailing,
|
||||
all
|
||||
}
|
||||
|
||||
export function removeComments(text: string, removal: CommentRemoval) {
|
||||
switch (removal) {
|
||||
case CommentRemoval.leading:
|
||||
return text.replace(leadingCommentRegExp, "");
|
||||
case CommentRemoval.trailing:
|
||||
return text.replace(trailingCommentRegExp, "");
|
||||
case CommentRemoval.leadingAndTrailing:
|
||||
return text.replace(leadingAndTrailingCommentRegExp, "");
|
||||
case CommentRemoval.all:
|
||||
return text.replace(allCommentRegExp, (match, quote) => quote ? match : "");
|
||||
}
|
||||
}
|
||||
|
||||
const testPathPrefixRegExp = /\/\.(ts|lib|src)\//g;
|
||||
export function removeTestPathPrefixes(text: string) {
|
||||
return text !== undefined ? text.replace(testPathPrefixRegExp, "") : undefined;
|
||||
}
|
||||
}
|
||||
+127
-14
@@ -7,7 +7,6 @@ namespace vfs {
|
||||
import KeyedCollection = collections.KeyedCollection;
|
||||
import Metadata = collections.Metadata;
|
||||
import EventEmitter = events.EventEmitter;
|
||||
import IO = Harness.IO;
|
||||
|
||||
export interface PathMappings {
|
||||
[path: string]: string;
|
||||
@@ -58,7 +57,7 @@ namespace vfs {
|
||||
return new RegExp(pattern, ignoreCase ? "i" : "");
|
||||
}
|
||||
|
||||
export function createResolver(io: IO, map?: PathMappings): FileSystemResolver {
|
||||
export function createResolver(io: Harness.IO, map?: PathMappings): FileSystemResolver {
|
||||
const mapper = createMapper(!io.useCaseSensitiveFileNames(), map);
|
||||
return {
|
||||
getEntries(dir) {
|
||||
@@ -126,6 +125,7 @@ namespace vfs {
|
||||
private _watchedDirectories: KeyedCollection<string, DirectoryWatcherEntryArray> | undefined;
|
||||
private _stringComparer: ts.Comparer<string> | undefined;
|
||||
private _pathComparer: ts.Comparer<string> | undefined;
|
||||
private _metadata: Metadata;
|
||||
private _onRootFileSystemChange: (path: string, change: FileSystemChange) => void;
|
||||
|
||||
constructor(currentDirectory: string, useCaseSensitiveFileNames: boolean) {
|
||||
@@ -154,6 +154,13 @@ namespace vfs {
|
||||
return this._shadowRoot;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets metadata about this file system.
|
||||
*/
|
||||
public get metadata(): Metadata {
|
||||
return this._metadata || (this._metadata = new Metadata(this.shadowRoot ? this.shadowRoot.metadata : undefined));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a value indicating whether to use case sensitive file names.
|
||||
*/
|
||||
@@ -183,28 +190,29 @@ namespace vfs {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a virtual file system with the following entries:
|
||||
* Gets a virtual file system with the following directories:
|
||||
*
|
||||
* | path | physical/virtual |
|
||||
* |:-------|:----------------------|
|
||||
* | /.ts | physical: built/local |
|
||||
* | /.lib | physical: tests/lib |
|
||||
* | /.test | virtual |
|
||||
* | /.src | virtual |
|
||||
*/
|
||||
public static getBuiltLocal(useCaseSensitiveFileNames: boolean = IO.useCaseSensitiveFileNames()): VirtualFileSystem {
|
||||
public static getBuiltLocal(useCaseSensitiveFileNames: boolean = Harness.IO.useCaseSensitiveFileNames()): VirtualFileSystem {
|
||||
let vfs = useCaseSensitiveFileNames ? this._builtLocalCS : this._builtLocalCI;
|
||||
if (!vfs) {
|
||||
vfs = this._builtLocal;
|
||||
if (!vfs) {
|
||||
const resolver = createResolver(IO, {
|
||||
const resolver = createResolver(Harness.IO, {
|
||||
"/.ts": __dirname,
|
||||
"/.lib": vpath.resolve(__dirname, "../../tests/lib")
|
||||
});
|
||||
vfs = new VirtualFileSystem("/", IO.useCaseSensitiveFileNames());
|
||||
vfs = new VirtualFileSystem("/", Harness.IO.useCaseSensitiveFileNames());
|
||||
vfs.metadata.set("defaultLibLocation", "/.ts");
|
||||
vfs.addDirectory("/.ts", resolver);
|
||||
vfs.addDirectory("/.lib", resolver);
|
||||
vfs.addDirectory("/.test");
|
||||
vfs.changeDirectory("/.test");
|
||||
vfs.addDirectory("/.src");
|
||||
vfs.changeDirectory("/.src");
|
||||
vfs.makeReadOnly();
|
||||
this._builtLocal = vfs;
|
||||
}
|
||||
@@ -220,6 +228,34 @@ namespace vfs {
|
||||
return vfs;
|
||||
}
|
||||
|
||||
public static createFromOptions(options: { useCaseSensitiveFileNames?: boolean, currentDirectory?: string }) {
|
||||
const vfs = this.getBuiltLocal(options.useCaseSensitiveFileNames).shadow();
|
||||
if (options.currentDirectory) {
|
||||
vfs.addDirectory(options.currentDirectory);
|
||||
vfs.changeDirectory(options.currentDirectory);
|
||||
}
|
||||
return vfs;
|
||||
}
|
||||
|
||||
public static createFromTestFiles(options: { useCaseSensitiveFileNames?: boolean, currentDirectory?: string }, documents: Harness.Compiler.TestFile[], fileOptions?: { overwrite?: boolean }) {
|
||||
const vfs = this.createFromOptions(options);
|
||||
for (const document of documents) {
|
||||
const file = vfs.addFile(document.unitName, document.content, fileOptions)!;
|
||||
assert.isDefined(file, `Failed to add file: '${document.unitName}'`);
|
||||
file.metadata.set("document", document);
|
||||
// Add symlinks
|
||||
const symlink = document.fileOptions && document.fileOptions.symlink;
|
||||
if (file && symlink) {
|
||||
for (const link of symlink.split(",")) {
|
||||
const symlink = vfs.addSymlink(vpath.resolve(vfs.currentDirectory, link.trim()), file)!;
|
||||
assert.isDefined(symlink, `Failed to symlink: '${link}'`);
|
||||
symlink.metadata.set("document", document);
|
||||
}
|
||||
}
|
||||
}
|
||||
return vfs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Changes the current directory to the supplied path.
|
||||
*/
|
||||
@@ -529,8 +565,27 @@ namespace vfs {
|
||||
}
|
||||
|
||||
export interface VirtualFileSystemEntry {
|
||||
// #region Event "fileSystemChange"
|
||||
on(event: "fileSystemChange", listener: (path: string, change: FileSystemChange) => void): this;
|
||||
emit(event: "fileSystemChange", path: string, change: FileSystemChange): boolean;
|
||||
once(event: "fileSystemChange", listener: (path: string, change: FileSystemChange) => void): this;
|
||||
addListener(event: "fileSystemChange", listener: (path: string, change: FileSystemChange) => void): this;
|
||||
removeListener(event: "fileSystemChange", listener: (path: string, change: FileSystemChange) => void): this;
|
||||
prependListener(event: "fileSystemChange", listener: (path: string, change: FileSystemChange) => void): this;
|
||||
prependOnceListener(event: "fileSystemChange", listener: (path: string, change: FileSystemChange) => void): this;
|
||||
emit(name: "fileSystemChange", path: string, change: FileSystemChange): boolean;
|
||||
// #endregion Event "fileSystemChange"
|
||||
}
|
||||
|
||||
export interface VirtualFileSystemEntry {
|
||||
// #region Untyped events
|
||||
on(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
once(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
addListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
emit(event: string | symbol, ...args: any[]): boolean;
|
||||
// #endregion Untyped events
|
||||
}
|
||||
|
||||
export abstract class VirtualFileSystemEntry extends VirtualFileSystemObject {
|
||||
@@ -631,10 +686,39 @@ namespace vfs {
|
||||
}
|
||||
|
||||
export interface VirtualDirectory {
|
||||
// #region Event "fileSystemChange"
|
||||
on(event: "fileSystemChange", listener: (path: string, change: FileSystemChange) => void): this;
|
||||
once(event: "fileSystemChange", listener: (path: string, change: FileSystemChange) => void): this;
|
||||
addListener(event: "fileSystemChange", listener: (path: string, change: FileSystemChange) => void): this;
|
||||
removeListener(event: "fileSystemChange", listener: (path: string, change: FileSystemChange) => void): this;
|
||||
prependListener(event: "fileSystemChange", listener: (path: string, change: FileSystemChange) => void): this;
|
||||
prependOnceListener(event: "fileSystemChange", listener: (path: string, change: FileSystemChange) => void): this;
|
||||
emit(name: "fileSystemChange", path: string, change: FileSystemChange): boolean;
|
||||
// #endregion Event "fileSystemChange"
|
||||
}
|
||||
|
||||
export interface VirtualDirectory {
|
||||
// #region Event "childAdded" | "childRemoved"
|
||||
on(event: "childAdded" | "childRemoved", listener: (child: VirtualEntry) => void): this;
|
||||
emit(event: "fileSystemChange", path: string, change: FileSystemChange): boolean;
|
||||
emit(event: "childAdded" | "childRemoved", child: VirtualEntry): boolean;
|
||||
once(event: "childAdded" | "childRemoved", listener: (child: VirtualEntry) => void): this;
|
||||
addListener(event: "childAdded" | "childRemoved", listener: (child: VirtualEntry) => void): this;
|
||||
removeListener(event: "childAdded" | "childRemoved", listener: (child: VirtualEntry) => void): this;
|
||||
prependListener(event: "childAdded" | "childRemoved", listener: (child: VirtualEntry) => void): this;
|
||||
prependOnceListener(event: "childAdded" | "childRemoved", listener: (child: VirtualEntry) => void): this;
|
||||
emit(name: "childAdded" | "childRemoved", child: VirtualEntry): boolean;
|
||||
// #endregion Event "childAdded" | "childRemoved"
|
||||
}
|
||||
|
||||
export interface VirtualDirectory {
|
||||
// #region Untyped events
|
||||
on(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
once(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
addListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
emit(event: string | symbol, ...args: any[]): boolean;
|
||||
// #endregion Untyped events
|
||||
}
|
||||
|
||||
export class VirtualDirectory extends VirtualFileSystemEntry {
|
||||
@@ -1277,10 +1361,39 @@ namespace vfs {
|
||||
}
|
||||
|
||||
export interface VirtualFile {
|
||||
// #region Event "fileSystemChange"
|
||||
on(event: "fileSystemChange", listener: (path: string, change: FileSystemChange) => void): this;
|
||||
once(event: "fileSystemChange", listener: (path: string, change: FileSystemChange) => void): this;
|
||||
addListener(event: "fileSystemChange", listener: (path: string, change: FileSystemChange) => void): this;
|
||||
removeListener(event: "fileSystemChange", listener: (path: string, change: FileSystemChange) => void): this;
|
||||
prependListener(event: "fileSystemChange", listener: (path: string, change: FileSystemChange) => void): this;
|
||||
prependOnceListener(event: "fileSystemChange", listener: (path: string, change: FileSystemChange) => void): this;
|
||||
emit(name: "fileSystemChange", path: string, change: FileSystemChange): boolean;
|
||||
// #endregion Event "fileSystemChange"
|
||||
}
|
||||
|
||||
export interface VirtualFile {
|
||||
// #region Event "contentChanged"
|
||||
on(event: "contentChanged", listener: (entry: VirtualFile) => void): this;
|
||||
emit(event: "fileSystemChange", path: string, change: FileSystemChange): boolean;
|
||||
emit(event: "contentChanged", entry: VirtualFile): boolean;
|
||||
once(event: "contentChanged", listener: (entry: VirtualFile) => void): this;
|
||||
addListener(event: "contentChanged", listener: (entry: VirtualFile) => void): this;
|
||||
removeListener(event: "contentChanged", listener: (entry: VirtualFile) => void): this;
|
||||
prependListener(event: "contentChanged", listener: (entry: VirtualFile) => void): this;
|
||||
prependOnceListener(event: "contentChanged", listener: (entry: VirtualFile) => void): this;
|
||||
emit(name: "contentChanged", entry: VirtualFile): boolean;
|
||||
// #endregion Event "contentChanged"
|
||||
}
|
||||
|
||||
export interface VirtualFile {
|
||||
// #region Untyped events
|
||||
on(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
once(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
addListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
emit(event: string | symbol, ...args: any[]): boolean;
|
||||
// #endregion Untyped events
|
||||
}
|
||||
|
||||
export class VirtualFile extends VirtualFileSystemEntry {
|
||||
|
||||
+34
-2
@@ -134,8 +134,6 @@ namespace vpath {
|
||||
* Compare two paths.
|
||||
*/
|
||||
export function compare(a: string, b: string, ignoreCase: boolean) {
|
||||
if (!isAbsolute(a)) throw new Error("Path not absolute");
|
||||
if (!isAbsolute(b)) throw new Error("Path not absolute");
|
||||
if (a === b) return 0;
|
||||
a = removeTrailingSeparator(a);
|
||||
b = removeTrailingSeparator(b);
|
||||
@@ -269,4 +267,38 @@ namespace vpath {
|
||||
const match = extRegExp.exec(path);
|
||||
return match ? match[0] : "";
|
||||
}
|
||||
|
||||
export function changeExtension(path: string, ext: string): string;
|
||||
export function changeExtension(path: string, ext: string, extensions: string | string[], ignoreCase: boolean): string;
|
||||
export function changeExtension(path: string, ext: string, extensions?: string | string[], ignoreCase?: boolean) {
|
||||
const pathext = extensions ? extname(path, extensions, ignoreCase) : extname(path);
|
||||
return pathext ? path.slice(0, path.length - pathext.length) + (ext.startsWith(".") ? ext : "." + ext) : path;
|
||||
}
|
||||
|
||||
export function isTypeScript(path: string) {
|
||||
return path.endsWith(".ts")
|
||||
|| path.endsWith(".tsx");
|
||||
}
|
||||
|
||||
export function isJavaScript(path: string) {
|
||||
return path.endsWith(".js")
|
||||
|| path.endsWith(".jsx");
|
||||
}
|
||||
|
||||
export function isDeclaration(path: string) {
|
||||
return path.endsWith(".d.ts");
|
||||
}
|
||||
|
||||
export function isSourceMap(path: string) {
|
||||
return path.endsWith(".map");
|
||||
}
|
||||
|
||||
export function isJson(path: string) {
|
||||
return path.endsWith(".json");
|
||||
}
|
||||
|
||||
export function isDefaultLibrary(path: string) {
|
||||
return isDeclaration(path)
|
||||
&& basename(path).startsWith("lib.");
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
tests/cases/conformance/statements/for-ofStatements/ES5For-of1.ts(2,5): error TS2304: Cannot find name 'console'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of1.ts (1 errors) ====
|
||||
for (var v of ['a', 'b', 'c']) {
|
||||
console.log(v);
|
||||
~~~~~~~
|
||||
!!! error TS2304: Cannot find name 'console'.
|
||||
}
|
||||
@@ -3,5 +3,8 @@ for (var v of ['a', 'b', 'c']) {
|
||||
>v : Symbol(v, Decl(ES5For-of1.ts, 0, 8))
|
||||
|
||||
console.log(v);
|
||||
>console.log : Symbol(Console.log, Decl(lib.d.ts, --, --))
|
||||
>console : Symbol(console, Decl(lib.d.ts, --, --))
|
||||
>log : Symbol(Console.log, Decl(lib.d.ts, --, --))
|
||||
>v : Symbol(v, Decl(ES5For-of1.ts, 0, 8))
|
||||
}
|
||||
@@ -7,9 +7,9 @@ for (var v of ['a', 'b', 'c']) {
|
||||
>'c' : "c"
|
||||
|
||||
console.log(v);
|
||||
>console.log(v) : any
|
||||
>console.log : any
|
||||
>console : any
|
||||
>log : any
|
||||
>console.log(v) : void
|
||||
>console.log : (message?: any, ...optionalParams: any[]) => void
|
||||
>console : Console
|
||||
>log : (message?: any, ...optionalParams: any[]) => void
|
||||
>v : string
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
tests/cases/conformance/statements/for-ofStatements/ES5For-of22.ts(3,5): error TS2304: Cannot find name 'console'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of22.ts (1 errors) ====
|
||||
for (var x of [1, 2, 3]) {
|
||||
let _a = 0;
|
||||
console.log(x);
|
||||
~~~~~~~
|
||||
!!! error TS2304: Cannot find name 'console'.
|
||||
}
|
||||
@@ -6,5 +6,8 @@ for (var x of [1, 2, 3]) {
|
||||
>_a : Symbol(_a, Decl(ES5For-of22.ts, 1, 7))
|
||||
|
||||
console.log(x);
|
||||
>console.log : Symbol(Console.log, Decl(lib.d.ts, --, --))
|
||||
>console : Symbol(console, Decl(lib.d.ts, --, --))
|
||||
>log : Symbol(Console.log, Decl(lib.d.ts, --, --))
|
||||
>x : Symbol(x, Decl(ES5For-of22.ts, 0, 8))
|
||||
}
|
||||
@@ -11,9 +11,9 @@ for (var x of [1, 2, 3]) {
|
||||
>0 : 0
|
||||
|
||||
console.log(x);
|
||||
>console.log(x) : any
|
||||
>console.log : any
|
||||
>console : any
|
||||
>log : any
|
||||
>console.log(x) : void
|
||||
>console.log : (message?: any, ...optionalParams: any[]) => void
|
||||
>console : Console
|
||||
>log : (message?: any, ...optionalParams: any[]) => void
|
||||
>x : number
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
tests/cases/conformance/statements/for-ofStatements/ES5For-of23.ts(3,5): error TS2304: Cannot find name 'console'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of23.ts (1 errors) ====
|
||||
for (var x of [1, 2, 3]) {
|
||||
var _a = 0;
|
||||
console.log(x);
|
||||
~~~~~~~
|
||||
!!! error TS2304: Cannot find name 'console'.
|
||||
}
|
||||
@@ -6,5 +6,8 @@ for (var x of [1, 2, 3]) {
|
||||
>_a : Symbol(_a, Decl(ES5For-of23.ts, 1, 7))
|
||||
|
||||
console.log(x);
|
||||
>console.log : Symbol(Console.log, Decl(lib.d.ts, --, --))
|
||||
>console : Symbol(console, Decl(lib.d.ts, --, --))
|
||||
>log : Symbol(Console.log, Decl(lib.d.ts, --, --))
|
||||
>x : Symbol(x, Decl(ES5For-of23.ts, 0, 8))
|
||||
}
|
||||
@@ -11,9 +11,9 @@ for (var x of [1, 2, 3]) {
|
||||
>0 : 0
|
||||
|
||||
console.log(x);
|
||||
>console.log(x) : any
|
||||
>console.log : any
|
||||
>console : any
|
||||
>log : any
|
||||
>console.log(x) : void
|
||||
>console.log : (message?: any, ...optionalParams: any[]) => void
|
||||
>console : Console
|
||||
>log : (message?: any, ...optionalParams: any[]) => void
|
||||
>x : number
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
tests/cases/conformance/statements/for-ofStatements/ES5For-of33.ts(2,5): error TS2304: Cannot find name 'console'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of33.ts (1 errors) ====
|
||||
for (var v of ['a', 'b', 'c']) {
|
||||
console.log(v);
|
||||
~~~~~~~
|
||||
!!! error TS2304: Cannot find name 'console'.
|
||||
}
|
||||
@@ -3,5 +3,8 @@ for (var v of ['a', 'b', 'c']) {
|
||||
>v : Symbol(v, Decl(ES5For-of33.ts, 0, 8))
|
||||
|
||||
console.log(v);
|
||||
>console.log : Symbol(Console.log, Decl(lib.d.ts, --, --))
|
||||
>console : Symbol(console, Decl(lib.d.ts, --, --))
|
||||
>log : Symbol(Console.log, Decl(lib.d.ts, --, --))
|
||||
>v : Symbol(v, Decl(ES5For-of33.ts, 0, 8))
|
||||
}
|
||||
@@ -7,9 +7,9 @@ for (var v of ['a', 'b', 'c']) {
|
||||
>'c' : "c"
|
||||
|
||||
console.log(v);
|
||||
>console.log(v) : any
|
||||
>console.log : any
|
||||
>console : any
|
||||
>log : any
|
||||
>console.log(v) : void
|
||||
>console.log : (message?: any, ...optionalParams: any[]) => void
|
||||
>console : Console
|
||||
>log : (message?: any, ...optionalParams: any[]) => void
|
||||
>v : string
|
||||
}
|
||||
@@ -56,8 +56,8 @@ var r3 = foo3(a); // any
|
||||
declare function foo5(x: Date): Date;
|
||||
>foo5 : Symbol(foo5, Decl(anyAssignabilityInInheritance.ts, 19, 17), Decl(anyAssignabilityInInheritance.ts, 21, 37))
|
||||
>x : Symbol(x, Decl(anyAssignabilityInInheritance.ts, 21, 22))
|
||||
>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
declare function foo5(x: any): any;
|
||||
>foo5 : Symbol(foo5, Decl(anyAssignabilityInInheritance.ts, 19, 17), Decl(anyAssignabilityInInheritance.ts, 21, 37))
|
||||
|
||||
@@ -44,7 +44,7 @@ var d: boolean = a;
|
||||
|
||||
var e: Date = a;
|
||||
>e : Symbol(e, Decl(anyAssignableToEveryType.ts, 17, 3))
|
||||
>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>a : Symbol(a, Decl(anyAssignableToEveryType.ts, 0, 3))
|
||||
|
||||
var f: any = a;
|
||||
@@ -122,7 +122,7 @@ function foo<T, U /*extends T*/, V extends Date>(x: T, y: U, z: V) {
|
||||
>T : Symbol(T, Decl(anyAssignableToEveryType.ts, 34, 13))
|
||||
>U : Symbol(U, Decl(anyAssignableToEveryType.ts, 34, 15))
|
||||
>V : Symbol(V, Decl(anyAssignableToEveryType.ts, 34, 32))
|
||||
>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>x : Symbol(x, Decl(anyAssignableToEveryType.ts, 34, 49))
|
||||
>T : Symbol(T, Decl(anyAssignableToEveryType.ts, 34, 13))
|
||||
>y : Symbol(y, Decl(anyAssignableToEveryType.ts, 34, 54))
|
||||
|
||||
@@ -50,7 +50,7 @@ interface I5 {
|
||||
|
||||
[x: string]: Date;
|
||||
>x : Symbol(x, Decl(anyAssignableToEveryType2.ts, 27, 5))
|
||||
>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
foo: any;
|
||||
>foo : Symbol(I5.foo, Decl(anyAssignableToEveryType2.ts, 27, 22))
|
||||
|
||||
@@ -13,9 +13,9 @@ function doubleAndReturnAsArray(x: number, y: number, z: number): [number, numbe
|
||||
>arguments : Symbol(arguments)
|
||||
|
||||
result.push(arg + arg);
|
||||
>result.push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --))
|
||||
>result.push : Symbol(Array.push, Decl(lib.es6.d.ts, --, --))
|
||||
>result : Symbol(result, Decl(argumentsObjectIterator01_ES6.ts, 1, 7))
|
||||
>push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --))
|
||||
>push : Symbol(Array.push, Decl(lib.es6.d.ts, --, --))
|
||||
>arg : Symbol(arg, Decl(argumentsObjectIterator01_ES6.ts, 2, 12))
|
||||
>arg : Symbol(arg, Decl(argumentsObjectIterator01_ES6.ts, 2, 12))
|
||||
}
|
||||
|
||||
@@ -8,9 +8,9 @@ function doubleAndReturnAsArray(x: number, y: number, z: number): [number, numbe
|
||||
let blah = arguments[Symbol.iterator];
|
||||
>blah : Symbol(blah, Decl(argumentsObjectIterator02_ES6.ts, 1, 7))
|
||||
>arguments : Symbol(arguments)
|
||||
>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --))
|
||||
>Symbol : Symbol(Symbol, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --))
|
||||
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --))
|
||||
>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es6.d.ts, --, --))
|
||||
>Symbol : Symbol(Symbol, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
let result = [];
|
||||
>result : Symbol(result, Decl(argumentsObjectIterator02_ES6.ts, 3, 7))
|
||||
@@ -20,9 +20,9 @@ function doubleAndReturnAsArray(x: number, y: number, z: number): [number, numbe
|
||||
>blah : Symbol(blah, Decl(argumentsObjectIterator02_ES6.ts, 1, 7))
|
||||
|
||||
result.push(arg + arg);
|
||||
>result.push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --))
|
||||
>result.push : Symbol(Array.push, Decl(lib.es6.d.ts, --, --))
|
||||
>result : Symbol(result, Decl(argumentsObjectIterator02_ES6.ts, 3, 7))
|
||||
>push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --))
|
||||
>push : Symbol(Array.push, Decl(lib.es6.d.ts, --, --))
|
||||
>arg : Symbol(arg, Decl(argumentsObjectIterator02_ES6.ts, 4, 12))
|
||||
>arg : Symbol(arg, Decl(argumentsObjectIterator02_ES6.ts, 4, 12))
|
||||
}
|
||||
|
||||
@@ -72,14 +72,14 @@ var temp2: [number[], string[]] = [[1, 2, 3], ["hello", "string"]];
|
||||
|
||||
interface myArray extends Array<Number> { }
|
||||
>myArray : Symbol(myArray, Decl(arrayLiterals2ES6.ts, 40, 67))
|
||||
>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
|
||||
>Number : Symbol(Number, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>Array : Symbol(Array, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>Number : Symbol(Number, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
interface myArray2 extends Array<Number|String> { }
|
||||
>myArray2 : Symbol(myArray2, Decl(arrayLiterals2ES6.ts, 42, 43))
|
||||
>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
|
||||
>Number : Symbol(Number, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --) ... and 1 more)
|
||||
>Array : Symbol(Array, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>Number : Symbol(Number, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>String : Symbol(String, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --) ... and 1 more)
|
||||
|
||||
var d0 = [1, true, ...temp, ]; // has type (string|number|boolean)[]
|
||||
>d0 : Symbol(d0, Decl(arrayLiterals2ES6.ts, 44, 3))
|
||||
|
||||
@@ -1,22 +1,16 @@
|
||||
tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(2,1): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'.
|
||||
tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(2,7): error TS2304: Cannot find name 'window'.
|
||||
tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(18,1): error TS2304: Cannot find name 'window'.
|
||||
tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(30,9): error TS2322: Type '() => number' is not assignable to type 'E'.
|
||||
tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(31,16): error TS2332: 'this' cannot be referenced in current location.
|
||||
tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(43,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'.
|
||||
tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(43,11): error TS2304: Cannot find name 'window'.
|
||||
tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(59,5): error TS2304: Cannot find name 'window'.
|
||||
tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(71,13): error TS2322: Type '() => number' is not assignable to type 'E'.
|
||||
tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(72,20): error TS2332: 'this' cannot be referenced in current location.
|
||||
|
||||
|
||||
==== tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts (10 errors) ====
|
||||
==== tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts (6 errors) ====
|
||||
// Arrow function used in with statement
|
||||
with (window) {
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'.
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'window'.
|
||||
var p = () => this;
|
||||
}
|
||||
|
||||
@@ -33,8 +27,6 @@ tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(72,20): e
|
||||
|
||||
// Arrow function as function argument
|
||||
window.setTimeout(() => null, 100);
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'window'.
|
||||
|
||||
// Arrow function as value in array literal
|
||||
|
||||
@@ -66,8 +58,6 @@ tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(72,20): e
|
||||
with (window) {
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'.
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'window'.
|
||||
var p = () => this;
|
||||
}
|
||||
|
||||
@@ -84,8 +74,6 @@ tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(72,20): e
|
||||
|
||||
// Arrow function as function argument
|
||||
window.setTimeout(() => null, 100);
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'window'.
|
||||
|
||||
// Arrow function as value in array literal
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
=== tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts ===
|
||||
// Arrow function used in with statement
|
||||
with (window) {
|
||||
>window : Symbol(window, Decl(lib.d.ts, --, --))
|
||||
|
||||
var p = () => this;
|
||||
}
|
||||
|
||||
@@ -25,6 +27,9 @@ class Derived extends Base {
|
||||
|
||||
// Arrow function as function argument
|
||||
window.setTimeout(() => null, 100);
|
||||
>window.setTimeout : Symbol(WindowTimers.setTimeout, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>window : Symbol(window, Decl(lib.d.ts, --, --))
|
||||
>setTimeout : Symbol(WindowTimers.setTimeout, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
// Arrow function as value in array literal
|
||||
|
||||
@@ -77,6 +82,8 @@ module M2 {
|
||||
|
||||
// Arrow function used in with statement
|
||||
with (window) {
|
||||
>window : Symbol(window, Decl(lib.d.ts, --, --))
|
||||
|
||||
var p = () => this;
|
||||
}
|
||||
|
||||
@@ -101,6 +108,9 @@ module M2 {
|
||||
|
||||
// Arrow function as function argument
|
||||
window.setTimeout(() => null, 100);
|
||||
>window.setTimeout : Symbol(WindowTimers.setTimeout, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>window : Symbol(window, Decl(lib.d.ts, --, --))
|
||||
>setTimeout : Symbol(WindowTimers.setTimeout, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
// Arrow function as value in array literal
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
=== tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts ===
|
||||
// Arrow function used in with statement
|
||||
with (window) {
|
||||
>window : any
|
||||
>window : Window
|
||||
|
||||
var p = () => this;
|
||||
>p : any
|
||||
@@ -32,10 +32,10 @@ class Derived extends Base {
|
||||
|
||||
// Arrow function as function argument
|
||||
window.setTimeout(() => null, 100);
|
||||
>window.setTimeout(() => null, 100) : any
|
||||
>window.setTimeout : any
|
||||
>window : any
|
||||
>setTimeout : any
|
||||
>window.setTimeout(() => null, 100) : number
|
||||
>window.setTimeout : { (handler: (...args: any[]) => void, timeout: number): number; (handler: any, timeout?: any, ...args: any[]): number; }
|
||||
>window : Window
|
||||
>setTimeout : { (handler: (...args: any[]) => void, timeout: number): number; (handler: any, timeout?: any, ...args: any[]): number; }
|
||||
>() => null : () => any
|
||||
>null : null
|
||||
>100 : 100
|
||||
@@ -104,7 +104,7 @@ module M2 {
|
||||
|
||||
// Arrow function used in with statement
|
||||
with (window) {
|
||||
>window : any
|
||||
>window : Window
|
||||
|
||||
var p = () => this;
|
||||
>p : any
|
||||
@@ -135,10 +135,10 @@ module M2 {
|
||||
|
||||
// Arrow function as function argument
|
||||
window.setTimeout(() => null, 100);
|
||||
>window.setTimeout(() => null, 100) : any
|
||||
>window.setTimeout : any
|
||||
>window : any
|
||||
>setTimeout : any
|
||||
>window.setTimeout(() => null, 100) : number
|
||||
>window.setTimeout : { (handler: (...args: any[]) => void, timeout: number): number; (handler: any, timeout?: any, ...args: any[]): number; }
|
||||
>window : Window
|
||||
>setTimeout : { (handler: (...args: any[]) => void, timeout: number): number; (handler: any, timeout?: any, ...args: any[]): number; }
|
||||
>() => null : () => any
|
||||
>null : null
|
||||
>100 : 100
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
=== tests/cases/compiler/arrowFunctionWithObjectLiteralBody6.ts ===
|
||||
var a = () => <Error>{ name: "foo", message: "bar" };
|
||||
>a : Symbol(a, Decl(arrowFunctionWithObjectLiteralBody6.ts, 0, 3))
|
||||
>Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>Error : Symbol(Error, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>name : Symbol(name, Decl(arrowFunctionWithObjectLiteralBody6.ts, 0, 22))
|
||||
>message : Symbol(message, Decl(arrowFunctionWithObjectLiteralBody6.ts, 0, 35))
|
||||
|
||||
var b = () => (<Error>{ name: "foo", message: "bar" });
|
||||
>b : Symbol(b, Decl(arrowFunctionWithObjectLiteralBody6.ts, 2, 3))
|
||||
>Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>Error : Symbol(Error, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>name : Symbol(name, Decl(arrowFunctionWithObjectLiteralBody6.ts, 2, 23))
|
||||
>message : Symbol(message, Decl(arrowFunctionWithObjectLiteralBody6.ts, 2, 36))
|
||||
|
||||
@@ -18,7 +18,7 @@ var c = () => ({ name: "foo", message: "bar" });
|
||||
|
||||
var d = () => ((<Error>({ name: "foo", message: "bar" })));
|
||||
>d : Symbol(d, Decl(arrowFunctionWithObjectLiteralBody6.ts, 6, 3))
|
||||
>Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>Error : Symbol(Error, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>name : Symbol(name, Decl(arrowFunctionWithObjectLiteralBody6.ts, 6, 25))
|
||||
>message : Symbol(message, Decl(arrowFunctionWithObjectLiteralBody6.ts, 6, 38))
|
||||
|
||||
@@ -13,7 +13,7 @@ var y = (null as string).length;
|
||||
|
||||
var z = Date as any as string;
|
||||
>z : Symbol(z, Decl(asOperator1.ts, 3, 3))
|
||||
>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
// Should parse as a union type, not a bitwise 'or' of (32 as number) and 'string'
|
||||
var j = 32 as number|string;
|
||||
|
||||
@@ -189,8 +189,8 @@ var a18: {
|
||||
|
||||
(a: Date): Date;
|
||||
>a : Symbol(a, Decl(assignmentCompatWithCallSignatures3.ts, 40, 9))
|
||||
>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
}): any[];
|
||||
}
|
||||
|
||||
@@ -189,8 +189,8 @@ var a18: {
|
||||
|
||||
new (a: Date): Date;
|
||||
>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures3.ts, 40, 13))
|
||||
>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
}): any[];
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
type PromiseAlias<T> = Promise<T>;
|
||||
>PromiseAlias : Symbol(PromiseAlias, Decl(asyncAliasReturnType_es6.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(asyncAliasReturnType_es6.ts, 0, 18))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>T : Symbol(T, Decl(asyncAliasReturnType_es6.ts, 0, 18))
|
||||
|
||||
async function f(): PromiseAlias<void> {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
=== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction10_es6.ts ===
|
||||
var foo = async (): Promise<void> => {
|
||||
>foo : Symbol(foo, Decl(asyncArrowFunction10_es6.ts, 0, 3))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
// Legal to use 'await' in a type context.
|
||||
var v: await;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction1_es6.ts ===
|
||||
var foo = async (): Promise<void> => {
|
||||
>foo : Symbol(foo, Decl(asyncArrowFunction1_es6.ts, 0, 3))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
};
|
||||
@@ -1,7 +1,7 @@
|
||||
tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction5_es6.ts(1,11): error TS2304: Cannot find name 'async'.
|
||||
tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction5_es6.ts(1,18): error TS2304: Cannot find name 'await'.
|
||||
tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction5_es6.ts(1,24): error TS1005: ',' expected.
|
||||
tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction5_es6.ts(1,26): error TS2403: Subsequent variable declarations must have the same type. Variable 'Promise' has type 'PromiseConstructor' at lib.es2015.promise.d.ts 222:12, but here has type 'void'.
|
||||
tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction5_es6.ts(1,26): error TS2403: Subsequent variable declarations must have the same type. Variable 'Promise' has type 'PromiseConstructor' at lib.es6.d.ts 5438:12, but here has type 'void'.
|
||||
tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction5_es6.ts(1,33): error TS1005: '=' expected.
|
||||
tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction5_es6.ts(1,40): error TS1109: Expression expected.
|
||||
|
||||
@@ -15,7 +15,7 @@ tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction5_es6.ts(
|
||||
~
|
||||
!!! error TS1005: ',' expected.
|
||||
~~~~~~~
|
||||
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'Promise' has type 'PromiseConstructor' at lib.es2015.promise.d.ts 222:12, but here has type 'void'.
|
||||
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'Promise' has type 'PromiseConstructor' at lib.es6.d.ts 5438:12, but here has type 'void'.
|
||||
~
|
||||
!!! error TS1005: '=' expected.
|
||||
~~
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
=== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction5_es6.ts ===
|
||||
var foo = async (await): Promise<void> => {
|
||||
>foo : Symbol(foo, Decl(asyncArrowFunction5_es6.ts, 0, 3))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(asyncArrowFunction5_es6.ts, 0, 24))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(asyncArrowFunction5_es6.ts, 0, 24))
|
||||
}
|
||||
@@ -2,5 +2,5 @@
|
||||
var foo = async (a = await): Promise<void> => {
|
||||
>foo : Symbol(foo, Decl(asyncArrowFunction6_es6.ts, 0, 3))
|
||||
>a : Symbol(a, Decl(asyncArrowFunction6_es6.ts, 0, 17))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
=== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction7_es6.ts ===
|
||||
var bar = async (): Promise<void> => {
|
||||
>bar : Symbol(bar, Decl(asyncArrowFunction7_es6.ts, 0, 3))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
// 'await' here is an identifier, and not an await expression.
|
||||
var foo = async (a = await): Promise<void> => {
|
||||
>foo : Symbol(foo, Decl(asyncArrowFunction7_es6.ts, 2, 5))
|
||||
>a : Symbol(a, Decl(asyncArrowFunction7_es6.ts, 2, 19))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
=== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction8_es6.ts ===
|
||||
var foo = async (): Promise<void> => {
|
||||
>foo : Symbol(foo, Decl(asyncArrowFunction8_es6.ts, 0, 3))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
var v = { [await]: foo }
|
||||
>v : Symbol(v, Decl(asyncArrowFunction8_es6.ts, 1, 5))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts(1,11): error TS2304: Cannot find name 'async'.
|
||||
tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts(1,18): error TS2304: Cannot find name 'a'.
|
||||
tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts(1,37): error TS1005: ',' expected.
|
||||
tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts(1,39): error TS2403: Subsequent variable declarations must have the same type. Variable 'Promise' has type 'PromiseConstructor' at lib.es2015.promise.d.ts 222:12, but here has type 'void'.
|
||||
tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts(1,39): error TS2403: Subsequent variable declarations must have the same type. Variable 'Promise' has type 'PromiseConstructor' at lib.es6.d.ts 5438:12, but here has type 'void'.
|
||||
tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts(1,46): error TS1005: '=' expected.
|
||||
tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts(1,53): error TS1109: Expression expected.
|
||||
|
||||
@@ -15,7 +15,7 @@ tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts(
|
||||
~
|
||||
!!! error TS1005: ',' expected.
|
||||
~~~~~~~
|
||||
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'Promise' has type 'PromiseConstructor' at lib.es2015.promise.d.ts 222:12, but here has type 'void'.
|
||||
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'Promise' has type 'PromiseConstructor' at lib.es6.d.ts 5438:12, but here has type 'void'.
|
||||
~
|
||||
!!! error TS1005: '=' expected.
|
||||
~~
|
||||
|
||||
@@ -3,5 +3,5 @@ var foo = async (a = await => await): Promise<void> => {
|
||||
>foo : Symbol(foo, Decl(asyncArrowFunction9_es6.ts, 0, 3))
|
||||
>await : Symbol(await, Decl(asyncArrowFunction9_es6.ts, 0, 20))
|
||||
>await : Symbol(await, Decl(asyncArrowFunction9_es6.ts, 0, 20))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(asyncArrowFunction9_es6.ts, 0, 37))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(asyncArrowFunction9_es6.ts, 0, 37))
|
||||
}
|
||||
@@ -10,9 +10,9 @@ class C {
|
||||
|
||||
var fn = async () => await other.apply(this, arguments);
|
||||
>fn : Symbol(fn, Decl(asyncArrowFunctionCapturesArguments_es6.ts, 3, 9))
|
||||
>other.apply : Symbol(Function.apply, Decl(lib.es5.d.ts, --, --))
|
||||
>other.apply : Symbol(Function.apply, Decl(lib.es6.d.ts, --, --))
|
||||
>other : Symbol(other, Decl(asyncArrowFunctionCapturesArguments_es6.ts, 1, 13))
|
||||
>apply : Symbol(Function.apply, Decl(lib.es5.d.ts, --, --))
|
||||
>apply : Symbol(Function.apply, Decl(lib.es6.d.ts, --, --))
|
||||
>this : Symbol(C, Decl(asyncArrowFunctionCapturesArguments_es6.ts, 0, 0))
|
||||
>arguments : Symbol(arguments)
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import { MyPromise } from "missing";
|
||||
|
||||
declare var p: Promise<number>;
|
||||
>p : Symbol(p, Decl(asyncAwaitIsolatedModules_es6.ts, 2, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
declare var mp: MyPromise<number>;
|
||||
>mp : Symbol(mp, Decl(asyncAwaitIsolatedModules_es6.ts, 3, 11))
|
||||
@@ -15,7 +15,7 @@ async function f0() { }
|
||||
|
||||
async function f1(): Promise<void> { }
|
||||
>f1 : Symbol(f1, Decl(asyncAwaitIsolatedModules_es6.ts, 5, 23))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
async function f3(): MyPromise<void> { }
|
||||
>f3 : Symbol(f3, Decl(asyncAwaitIsolatedModules_es6.ts, 6, 38))
|
||||
@@ -26,7 +26,7 @@ let f4 = async function() { }
|
||||
|
||||
let f5 = async function(): Promise<void> { }
|
||||
>f5 : Symbol(f5, Decl(asyncAwaitIsolatedModules_es6.ts, 10, 3))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
let f6 = async function(): MyPromise<void> { }
|
||||
>f6 : Symbol(f6, Decl(asyncAwaitIsolatedModules_es6.ts, 11, 3))
|
||||
@@ -37,7 +37,7 @@ let f7 = async () => { };
|
||||
|
||||
let f8 = async (): Promise<void> => { };
|
||||
>f8 : Symbol(f8, Decl(asyncAwaitIsolatedModules_es6.ts, 14, 3))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
let f9 = async (): MyPromise<void> => { };
|
||||
>f9 : Symbol(f9, Decl(asyncAwaitIsolatedModules_es6.ts, 15, 3))
|
||||
@@ -53,7 +53,7 @@ let f11 = async () => mp;
|
||||
|
||||
let f12 = async (): Promise<number> => mp;
|
||||
>f12 : Symbol(f12, Decl(asyncAwaitIsolatedModules_es6.ts, 18, 3))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>mp : Symbol(mp, Decl(asyncAwaitIsolatedModules_es6.ts, 3, 11))
|
||||
|
||||
let f13 = async (): MyPromise<number> => p;
|
||||
@@ -69,7 +69,7 @@ let o = {
|
||||
|
||||
async m2(): Promise<void> { },
|
||||
>m2 : Symbol(m2, Decl(asyncAwaitIsolatedModules_es6.ts, 22, 16))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
async m3(): MyPromise<void> { }
|
||||
>m3 : Symbol(m3, Decl(asyncAwaitIsolatedModules_es6.ts, 23, 31))
|
||||
@@ -85,7 +85,7 @@ class C {
|
||||
|
||||
async m2(): Promise<void> { }
|
||||
>m2 : Symbol(C.m2, Decl(asyncAwaitIsolatedModules_es6.ts, 28, 15))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
async m3(): MyPromise<void> { }
|
||||
>m3 : Symbol(C.m3, Decl(asyncAwaitIsolatedModules_es6.ts, 29, 30))
|
||||
@@ -96,7 +96,7 @@ class C {
|
||||
|
||||
static async m5(): Promise<void> { }
|
||||
>m5 : Symbol(C.m5, Decl(asyncAwaitIsolatedModules_es6.ts, 31, 22))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
static async m6(): MyPromise<void> { }
|
||||
>m6 : Symbol(C.m6, Decl(asyncAwaitIsolatedModules_es6.ts, 32, 37))
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
type MyPromise<T> = Promise<T>;
|
||||
>MyPromise : Symbol(MyPromise, Decl(asyncAwait_es6.ts, 0, 0), Decl(asyncAwait_es6.ts, 1, 11))
|
||||
>T : Symbol(T, Decl(asyncAwait_es6.ts, 0, 15))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>T : Symbol(T, Decl(asyncAwait_es6.ts, 0, 15))
|
||||
|
||||
declare var MyPromise: typeof Promise;
|
||||
>MyPromise : Symbol(MyPromise, Decl(asyncAwait_es6.ts, 0, 0), Decl(asyncAwait_es6.ts, 1, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
declare var p: Promise<number>;
|
||||
>p : Symbol(p, Decl(asyncAwait_es6.ts, 2, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
declare var mp: MyPromise<number>;
|
||||
>mp : Symbol(mp, Decl(asyncAwait_es6.ts, 3, 11))
|
||||
@@ -22,7 +22,7 @@ async function f0() { }
|
||||
|
||||
async function f1(): Promise<void> { }
|
||||
>f1 : Symbol(f1, Decl(asyncAwait_es6.ts, 5, 23))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
async function f3(): MyPromise<void> { }
|
||||
>f3 : Symbol(f3, Decl(asyncAwait_es6.ts, 6, 38))
|
||||
@@ -33,7 +33,7 @@ let f4 = async function() { }
|
||||
|
||||
let f5 = async function(): Promise<void> { }
|
||||
>f5 : Symbol(f5, Decl(asyncAwait_es6.ts, 10, 3))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
let f6 = async function(): MyPromise<void> { }
|
||||
>f6 : Symbol(f6, Decl(asyncAwait_es6.ts, 11, 3))
|
||||
@@ -44,7 +44,7 @@ let f7 = async () => { };
|
||||
|
||||
let f8 = async (): Promise<void> => { };
|
||||
>f8 : Symbol(f8, Decl(asyncAwait_es6.ts, 14, 3))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
let f9 = async (): MyPromise<void> => { };
|
||||
>f9 : Symbol(f9, Decl(asyncAwait_es6.ts, 15, 3))
|
||||
@@ -60,7 +60,7 @@ let f11 = async () => mp;
|
||||
|
||||
let f12 = async (): Promise<number> => mp;
|
||||
>f12 : Symbol(f12, Decl(asyncAwait_es6.ts, 18, 3))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>mp : Symbol(mp, Decl(asyncAwait_es6.ts, 3, 11))
|
||||
|
||||
let f13 = async (): MyPromise<number> => p;
|
||||
@@ -76,7 +76,7 @@ let o = {
|
||||
|
||||
async m2(): Promise<void> { },
|
||||
>m2 : Symbol(m2, Decl(asyncAwait_es6.ts, 22, 16))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
async m3(): MyPromise<void> { }
|
||||
>m3 : Symbol(m3, Decl(asyncAwait_es6.ts, 23, 31))
|
||||
@@ -92,7 +92,7 @@ class C {
|
||||
|
||||
async m2(): Promise<void> { }
|
||||
>m2 : Symbol(C.m2, Decl(asyncAwait_es6.ts, 28, 15))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
async m3(): MyPromise<void> { }
|
||||
>m3 : Symbol(C.m3, Decl(asyncAwait_es6.ts, 29, 30))
|
||||
@@ -103,7 +103,7 @@ class C {
|
||||
|
||||
static async m5(): Promise<void> { }
|
||||
>m5 : Symbol(C.m5, Decl(asyncAwait_es6.ts, 31, 22))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
static async m6(): MyPromise<void> { }
|
||||
>m6 : Symbol(C.m6, Decl(asyncAwait_es6.ts, 32, 37))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
=== tests/cases/conformance/async/es6/asyncDeclare_es6.ts ===
|
||||
declare async function foo(): Promise<void>;
|
||||
>foo : Symbol(foo, Decl(asyncDeclare_es6.ts, 0, 0))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
async function foo(a = await => await): Promise<void> {
|
||||
>foo : Symbol(foo, Decl(asyncFunctionDeclaration10_es6.ts, 0, 0))
|
||||
>a : Symbol(a, Decl(asyncFunctionDeclaration10_es6.ts, 0, 19))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration11_es6.ts ===
|
||||
async function await(): Promise<void> {
|
||||
>await : Symbol(await, Decl(asyncFunctionDeclaration11_es6.ts, 0, 0))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
}
|
||||
@@ -2,5 +2,5 @@
|
||||
var v = async function await(): Promise<void> { }
|
||||
>v : Symbol(v, Decl(asyncFunctionDeclaration12_es6.ts, 0, 3))
|
||||
>await : Symbol(await, Decl(asyncFunctionDeclaration12_es6.ts, 0, 22))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration13_es6.ts ===
|
||||
async function foo(): Promise<void> {
|
||||
>foo : Symbol(foo, Decl(asyncFunctionDeclaration13_es6.ts, 0, 0))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
// Legal to use 'await' in a type context.
|
||||
var v: await;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration14_es6.ts ===
|
||||
async function foo(): Promise<void> {
|
||||
>foo : Symbol(foo, Decl(asyncFunctionDeclaration14_es6.ts, 0, 0))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -28,7 +28,7 @@ async function fn4(): number { } // error
|
||||
|
||||
async function fn5(): PromiseLike<void> { } // error
|
||||
>fn5 : Symbol(fn5, Decl(asyncFunctionDeclaration15_es6.ts, 7, 32))
|
||||
>PromiseLike : Symbol(PromiseLike, Decl(lib.es5.d.ts, --, --))
|
||||
>PromiseLike : Symbol(PromiseLike, Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
async function fn6(): Thenable { } // error
|
||||
>fn6 : Symbol(fn6, Decl(asyncFunctionDeclaration15_es6.ts, 8, 43))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration1_es6.ts ===
|
||||
async function foo(): Promise<void> {
|
||||
>foo : Symbol(foo, Decl(asyncFunctionDeclaration1_es6.ts, 0, 0))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration5_es6.ts ===
|
||||
async function foo(await): Promise<void> {
|
||||
>foo : Symbol(foo, Decl(asyncFunctionDeclaration5_es6.ts, 0, 0))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
}
|
||||
@@ -2,5 +2,5 @@
|
||||
async function foo(a = await): Promise<void> {
|
||||
>foo : Symbol(foo, Decl(asyncFunctionDeclaration6_es6.ts, 0, 0))
|
||||
>a : Symbol(a, Decl(asyncFunctionDeclaration6_es6.ts, 0, 19))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration7_es6.ts ===
|
||||
async function bar(): Promise<void> {
|
||||
>bar : Symbol(bar, Decl(asyncFunctionDeclaration7_es6.ts, 0, 0))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
// 'await' here is an identifier, and not a yield expression.
|
||||
async function foo(a = await): Promise<void> {
|
||||
>foo : Symbol(foo, Decl(asyncFunctionDeclaration7_es6.ts, 0, 37))
|
||||
>a : Symbol(a, Decl(asyncFunctionDeclaration7_es6.ts, 2, 21))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration9_es6.ts ===
|
||||
async function foo(): Promise<void> {
|
||||
>foo : Symbol(foo, Decl(asyncFunctionDeclaration9_es6.ts, 0, 0))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
var v = { [await]: foo }
|
||||
>v : Symbol(v, Decl(asyncFunctionDeclaration9_es6.ts, 1, 5))
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
error TS2468: Cannot find global value 'Promise'.
|
||||
tests/cases/compiler/asyncFunctionNoReturnType.ts(1,1): error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option.
|
||||
tests/cases/compiler/asyncFunctionNoReturnType.ts(2,9): error TS2304: Cannot find name 'window'.
|
||||
|
||||
|
||||
!!! error TS2468: Cannot find global value 'Promise'.
|
||||
==== tests/cases/compiler/asyncFunctionNoReturnType.ts (2 errors) ====
|
||||
==== tests/cases/compiler/asyncFunctionNoReturnType.ts (1 errors) ====
|
||||
async () => {
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option.
|
||||
if (window)
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'window'.
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
=== tests/cases/compiler/asyncFunctionNoReturnType.ts ===
|
||||
async () => {
|
||||
No type information for this code. if (window)
|
||||
No type information for this code. return;
|
||||
No type information for this code.}
|
||||
No type information for this code.
|
||||
No type information for this code.
|
||||
if (window)
|
||||
>window : Symbol(window, Decl(lib.d.ts, --, --))
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ async () => {
|
||||
>async () => { if (window) return;} : () => Promise<void>
|
||||
|
||||
if (window)
|
||||
>window : any
|
||||
>window : Window
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ async function fAsync() {
|
||||
|
||||
async function fAsyncExplicit(): Promise<[number, boolean]> {
|
||||
>fAsyncExplicit : Symbol(fAsyncExplicit, Decl(asyncFunctionReturnType.ts, 3, 1))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
// This is contextually typed as a tuple.
|
||||
return [1, true];
|
||||
@@ -29,7 +29,7 @@ async function fIndexedTypeForStringProp(obj: Obj): Promise<Obj["stringProp"]> {
|
||||
>fIndexedTypeForStringProp : Symbol(fIndexedTypeForStringProp, Decl(asyncFunctionReturnType.ts, 14, 1))
|
||||
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 16, 41))
|
||||
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
|
||||
|
||||
return obj.stringProp;
|
||||
@@ -42,13 +42,13 @@ async function fIndexedTypeForPromiseOfStringProp(obj: Obj): Promise<Obj["string
|
||||
>fIndexedTypeForPromiseOfStringProp : Symbol(fIndexedTypeForPromiseOfStringProp, Decl(asyncFunctionReturnType.ts, 18, 1))
|
||||
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 20, 50))
|
||||
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
|
||||
|
||||
return Promise.resolve(obj.stringProp);
|
||||
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>obj.stringProp : Symbol(Obj.stringProp, Decl(asyncFunctionReturnType.ts, 11, 15))
|
||||
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 20, 50))
|
||||
>stringProp : Symbol(Obj.stringProp, Decl(asyncFunctionReturnType.ts, 11, 15))
|
||||
@@ -58,13 +58,13 @@ async function fIndexedTypeForExplicitPromiseOfStringProp(obj: Obj): Promise<Obj
|
||||
>fIndexedTypeForExplicitPromiseOfStringProp : Symbol(fIndexedTypeForExplicitPromiseOfStringProp, Decl(asyncFunctionReturnType.ts, 22, 1))
|
||||
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 24, 58))
|
||||
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
|
||||
|
||||
return Promise.resolve<Obj["stringProp"]>(obj.stringProp);
|
||||
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
|
||||
>obj.stringProp : Symbol(Obj.stringProp, Decl(asyncFunctionReturnType.ts, 11, 15))
|
||||
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 24, 58))
|
||||
@@ -75,7 +75,7 @@ async function fIndexedTypeForAnyProp(obj: Obj): Promise<Obj["anyProp"]> {
|
||||
>fIndexedTypeForAnyProp : Symbol(fIndexedTypeForAnyProp, Decl(asyncFunctionReturnType.ts, 26, 1))
|
||||
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 28, 38))
|
||||
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
|
||||
|
||||
return obj.anyProp;
|
||||
@@ -88,13 +88,13 @@ async function fIndexedTypeForPromiseOfAnyProp(obj: Obj): Promise<Obj["anyProp"]
|
||||
>fIndexedTypeForPromiseOfAnyProp : Symbol(fIndexedTypeForPromiseOfAnyProp, Decl(asyncFunctionReturnType.ts, 30, 1))
|
||||
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 32, 47))
|
||||
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
|
||||
|
||||
return Promise.resolve(obj.anyProp);
|
||||
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>obj.anyProp : Symbol(Obj.anyProp, Decl(asyncFunctionReturnType.ts, 12, 23))
|
||||
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 32, 47))
|
||||
>anyProp : Symbol(Obj.anyProp, Decl(asyncFunctionReturnType.ts, 12, 23))
|
||||
@@ -104,13 +104,13 @@ async function fIndexedTypeForExplicitPromiseOfAnyProp(obj: Obj): Promise<Obj["a
|
||||
>fIndexedTypeForExplicitPromiseOfAnyProp : Symbol(fIndexedTypeForExplicitPromiseOfAnyProp, Decl(asyncFunctionReturnType.ts, 34, 1))
|
||||
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 36, 55))
|
||||
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
|
||||
|
||||
return Promise.resolve<Obj["anyProp"]>(obj.anyProp);
|
||||
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
|
||||
>obj.anyProp : Symbol(Obj.anyProp, Decl(asyncFunctionReturnType.ts, 12, 23))
|
||||
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 36, 55))
|
||||
@@ -123,7 +123,7 @@ async function fGenericIndexedTypeForStringProp<TObj extends Obj>(obj: TObj): Pr
|
||||
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
|
||||
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 40, 66))
|
||||
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 40, 48))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 40, 48))
|
||||
|
||||
return obj.stringProp;
|
||||
@@ -138,13 +138,13 @@ async function fGenericIndexedTypeForPromiseOfStringProp<TObj extends Obj>(obj:
|
||||
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
|
||||
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 44, 75))
|
||||
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 44, 57))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 44, 57))
|
||||
|
||||
return Promise.resolve(obj.stringProp);
|
||||
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>obj.stringProp : Symbol(Obj.stringProp, Decl(asyncFunctionReturnType.ts, 11, 15))
|
||||
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 44, 75))
|
||||
>stringProp : Symbol(Obj.stringProp, Decl(asyncFunctionReturnType.ts, 11, 15))
|
||||
@@ -156,13 +156,13 @@ async function fGenericIndexedTypeForExplicitPromiseOfStringProp<TObj extends Ob
|
||||
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
|
||||
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 48, 83))
|
||||
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 48, 65))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 48, 65))
|
||||
|
||||
return Promise.resolve<TObj["stringProp"]>(obj.stringProp);
|
||||
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 48, 65))
|
||||
>obj.stringProp : Symbol(Obj.stringProp, Decl(asyncFunctionReturnType.ts, 11, 15))
|
||||
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 48, 83))
|
||||
@@ -175,7 +175,7 @@ async function fGenericIndexedTypeForAnyProp<TObj extends Obj>(obj: TObj): Promi
|
||||
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
|
||||
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 52, 63))
|
||||
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 52, 45))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 52, 45))
|
||||
|
||||
return obj.anyProp;
|
||||
@@ -190,13 +190,13 @@ async function fGenericIndexedTypeForPromiseOfAnyProp<TObj extends Obj>(obj: TOb
|
||||
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
|
||||
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 56, 72))
|
||||
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 56, 54))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 56, 54))
|
||||
|
||||
return Promise.resolve(obj.anyProp);
|
||||
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>obj.anyProp : Symbol(Obj.anyProp, Decl(asyncFunctionReturnType.ts, 12, 23))
|
||||
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 56, 72))
|
||||
>anyProp : Symbol(Obj.anyProp, Decl(asyncFunctionReturnType.ts, 12, 23))
|
||||
@@ -208,13 +208,13 @@ async function fGenericIndexedTypeForExplicitPromiseOfAnyProp<TObj extends Obj>(
|
||||
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
|
||||
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 60, 80))
|
||||
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 60, 62))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 60, 62))
|
||||
|
||||
return Promise.resolve<TObj["anyProp"]>(obj.anyProp);
|
||||
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 60, 62))
|
||||
>obj.anyProp : Symbol(Obj.anyProp, Decl(asyncFunctionReturnType.ts, 12, 23))
|
||||
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 60, 80))
|
||||
@@ -231,7 +231,7 @@ async function fGenericIndexedTypeForKProp<TObj extends Obj, K extends keyof TOb
|
||||
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 64, 43))
|
||||
>key : Symbol(key, Decl(asyncFunctionReturnType.ts, 64, 93))
|
||||
>K : Symbol(K, Decl(asyncFunctionReturnType.ts, 64, 60))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 64, 43))
|
||||
>K : Symbol(K, Decl(asyncFunctionReturnType.ts, 64, 60))
|
||||
|
||||
@@ -250,14 +250,14 @@ async function fGenericIndexedTypeForPromiseOfKProp<TObj extends Obj, K extends
|
||||
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 68, 52))
|
||||
>key : Symbol(key, Decl(asyncFunctionReturnType.ts, 68, 102))
|
||||
>K : Symbol(K, Decl(asyncFunctionReturnType.ts, 68, 69))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 68, 52))
|
||||
>K : Symbol(K, Decl(asyncFunctionReturnType.ts, 68, 69))
|
||||
|
||||
return Promise.resolve(obj[key]);
|
||||
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 68, 92))
|
||||
>key : Symbol(key, Decl(asyncFunctionReturnType.ts, 68, 102))
|
||||
}
|
||||
@@ -272,14 +272,14 @@ async function fGenericIndexedTypeForExplicitPromiseOfKProp<TObj extends Obj, K
|
||||
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 72, 60))
|
||||
>key : Symbol(key, Decl(asyncFunctionReturnType.ts, 72, 110))
|
||||
>K : Symbol(K, Decl(asyncFunctionReturnType.ts, 72, 77))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 72, 60))
|
||||
>K : Symbol(K, Decl(asyncFunctionReturnType.ts, 72, 77))
|
||||
|
||||
return Promise.resolve<TObj[K]>(obj[key]);
|
||||
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 72, 60))
|
||||
>K : Symbol(K, Decl(asyncFunctionReturnType.ts, 72, 77))
|
||||
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 72, 100))
|
||||
|
||||
@@ -105,7 +105,7 @@ declare function resolve1<T>(value: T): Promise<T>;
|
||||
>T : Symbol(T, Decl(asyncFunctionsAndStrictNullChecks.ts, 17, 26))
|
||||
>value : Symbol(value, Decl(asyncFunctionsAndStrictNullChecks.ts, 17, 29))
|
||||
>T : Symbol(T, Decl(asyncFunctionsAndStrictNullChecks.ts, 17, 26))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>T : Symbol(T, Decl(asyncFunctionsAndStrictNullChecks.ts, 17, 26))
|
||||
|
||||
declare function resolve2<T>(value: T): Windows.Foundation.IPromise<T>;
|
||||
|
||||
@@ -5,7 +5,7 @@ function f1() {
|
||||
(async () => {
|
||||
await 10
|
||||
throw new Error();
|
||||
>Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>Error : Symbol(Error, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
})();
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
export class Task<T> extends Promise<T> { }
|
||||
>Task : Symbol(Task, Decl(task.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(task.ts, 0, 18))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>T : Symbol(T, Decl(task.ts, 0, 18))
|
||||
|
||||
=== tests/cases/conformance/async/es6/test.ts ===
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace X {
|
||||
export class MyPromise<T> extends Promise<T> {
|
||||
>MyPromise : Symbol(MyPromise, Decl(asyncQualifiedReturnType_es6.ts, 0, 13))
|
||||
>T : Symbol(T, Decl(asyncQualifiedReturnType_es6.ts, 1, 27))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>T : Symbol(T, Decl(asyncQualifiedReturnType_es6.ts, 1, 27))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
declare function someOtherFunction(i: any): Promise<void>;
|
||||
>someOtherFunction : Symbol(someOtherFunction, Decl(asyncUnParenthesizedArrowFunction_es6.ts, 0, 0))
|
||||
>i : Symbol(i, Decl(asyncUnParenthesizedArrowFunction_es6.ts, 0, 35))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
const x = async i => await someOtherFunction(i)
|
||||
>x : Symbol(x, Decl(asyncUnParenthesizedArrowFunction_es6.ts, 1, 5))
|
||||
|
||||
@@ -4,11 +4,11 @@ declare var a: boolean;
|
||||
|
||||
declare var p: Promise<boolean>;
|
||||
>p : Symbol(p, Decl(asyncUseStrict_es6.ts, 1, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
async function func(): Promise<void> {
|
||||
>func : Symbol(func, Decl(asyncUseStrict_es6.ts, 1, 32))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
"use strict";
|
||||
var b = await p || a;
|
||||
|
||||
@@ -4,7 +4,7 @@ declare var a: boolean;
|
||||
|
||||
declare var p: Promise<boolean>;
|
||||
>p : Symbol(p, Decl(awaitBinaryExpression1_es6.ts, 1, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
declare function before(): void;
|
||||
>before : Symbol(before, Decl(awaitBinaryExpression1_es6.ts, 1, 32))
|
||||
@@ -14,7 +14,7 @@ declare function after(): void;
|
||||
|
||||
async function func(): Promise<void> {
|
||||
>func : Symbol(func, Decl(awaitBinaryExpression1_es6.ts, 3, 31))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
before();
|
||||
>before : Symbol(before, Decl(awaitBinaryExpression1_es6.ts, 1, 32))
|
||||
|
||||
@@ -4,7 +4,7 @@ declare var a: boolean;
|
||||
|
||||
declare var p: Promise<boolean>;
|
||||
>p : Symbol(p, Decl(awaitBinaryExpression2_es6.ts, 1, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
declare function before(): void;
|
||||
>before : Symbol(before, Decl(awaitBinaryExpression2_es6.ts, 1, 32))
|
||||
@@ -14,7 +14,7 @@ declare function after(): void;
|
||||
|
||||
async function func(): Promise<void> {
|
||||
>func : Symbol(func, Decl(awaitBinaryExpression2_es6.ts, 3, 31))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
before();
|
||||
>before : Symbol(before, Decl(awaitBinaryExpression2_es6.ts, 1, 32))
|
||||
|
||||
@@ -4,7 +4,7 @@ declare var a: number;
|
||||
|
||||
declare var p: Promise<number>;
|
||||
>p : Symbol(p, Decl(awaitBinaryExpression3_es6.ts, 1, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
declare function before(): void;
|
||||
>before : Symbol(before, Decl(awaitBinaryExpression3_es6.ts, 1, 31))
|
||||
@@ -14,7 +14,7 @@ declare function after(): void;
|
||||
|
||||
async function func(): Promise<void> {
|
||||
>func : Symbol(func, Decl(awaitBinaryExpression3_es6.ts, 3, 31))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
before();
|
||||
>before : Symbol(before, Decl(awaitBinaryExpression3_es6.ts, 1, 31))
|
||||
|
||||
@@ -4,7 +4,7 @@ declare var a: boolean;
|
||||
|
||||
declare var p: Promise<boolean>;
|
||||
>p : Symbol(p, Decl(awaitBinaryExpression4_es6.ts, 1, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
declare function before(): void;
|
||||
>before : Symbol(before, Decl(awaitBinaryExpression4_es6.ts, 1, 32))
|
||||
@@ -14,7 +14,7 @@ declare function after(): void;
|
||||
|
||||
async function func(): Promise<void> {
|
||||
>func : Symbol(func, Decl(awaitBinaryExpression4_es6.ts, 3, 31))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
before();
|
||||
>before : Symbol(before, Decl(awaitBinaryExpression4_es6.ts, 1, 32))
|
||||
|
||||
@@ -4,7 +4,7 @@ declare var a: boolean;
|
||||
|
||||
declare var p: Promise<boolean>;
|
||||
>p : Symbol(p, Decl(awaitBinaryExpression5_es6.ts, 1, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
declare function before(): void;
|
||||
>before : Symbol(before, Decl(awaitBinaryExpression5_es6.ts, 1, 32))
|
||||
@@ -14,7 +14,7 @@ declare function after(): void;
|
||||
|
||||
async function func(): Promise<void> {
|
||||
>func : Symbol(func, Decl(awaitBinaryExpression5_es6.ts, 3, 31))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
before();
|
||||
>before : Symbol(before, Decl(awaitBinaryExpression5_es6.ts, 1, 32))
|
||||
|
||||
@@ -4,7 +4,7 @@ declare var a: boolean;
|
||||
|
||||
declare var p: Promise<boolean>;
|
||||
>p : Symbol(p, Decl(awaitCallExpression1_es6.ts, 1, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression1_es6.ts, 1, 32))
|
||||
@@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; };
|
||||
|
||||
declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>pfn : Symbol(pfn, Decl(awaitCallExpression1_es6.ts, 4, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression1_es6.ts, 4, 28))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression1_es6.ts, 4, 42))
|
||||
>arg2 : Symbol(arg2, Decl(awaitCallExpression1_es6.ts, 4, 57))
|
||||
|
||||
declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>po : Symbol(po, Decl(awaitCallExpression1_es6.ts, 5, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression1_es6.ts, 5, 25))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression1_es6.ts, 5, 29))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression1_es6.ts, 5, 43))
|
||||
@@ -42,7 +42,7 @@ declare function after(): void;
|
||||
|
||||
async function func(): Promise<void> {
|
||||
>func : Symbol(func, Decl(awaitCallExpression1_es6.ts, 7, 31))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
before();
|
||||
>before : Symbol(before, Decl(awaitCallExpression1_es6.ts, 5, 84))
|
||||
|
||||
@@ -4,7 +4,7 @@ declare var a: boolean;
|
||||
|
||||
declare var p: Promise<boolean>;
|
||||
>p : Symbol(p, Decl(awaitCallExpression2_es6.ts, 1, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression2_es6.ts, 1, 32))
|
||||
@@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; };
|
||||
|
||||
declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>pfn : Symbol(pfn, Decl(awaitCallExpression2_es6.ts, 4, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression2_es6.ts, 4, 28))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression2_es6.ts, 4, 42))
|
||||
>arg2 : Symbol(arg2, Decl(awaitCallExpression2_es6.ts, 4, 57))
|
||||
|
||||
declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>po : Symbol(po, Decl(awaitCallExpression2_es6.ts, 5, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression2_es6.ts, 5, 25))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression2_es6.ts, 5, 29))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression2_es6.ts, 5, 43))
|
||||
@@ -42,7 +42,7 @@ declare function after(): void;
|
||||
|
||||
async function func(): Promise<void> {
|
||||
>func : Symbol(func, Decl(awaitCallExpression2_es6.ts, 7, 31))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
before();
|
||||
>before : Symbol(before, Decl(awaitCallExpression2_es6.ts, 5, 84))
|
||||
|
||||
@@ -4,7 +4,7 @@ declare var a: boolean;
|
||||
|
||||
declare var p: Promise<boolean>;
|
||||
>p : Symbol(p, Decl(awaitCallExpression3_es6.ts, 1, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression3_es6.ts, 1, 32))
|
||||
@@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; };
|
||||
|
||||
declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>pfn : Symbol(pfn, Decl(awaitCallExpression3_es6.ts, 4, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression3_es6.ts, 4, 28))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression3_es6.ts, 4, 42))
|
||||
>arg2 : Symbol(arg2, Decl(awaitCallExpression3_es6.ts, 4, 57))
|
||||
|
||||
declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>po : Symbol(po, Decl(awaitCallExpression3_es6.ts, 5, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression3_es6.ts, 5, 25))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression3_es6.ts, 5, 29))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression3_es6.ts, 5, 43))
|
||||
@@ -42,7 +42,7 @@ declare function after(): void;
|
||||
|
||||
async function func(): Promise<void> {
|
||||
>func : Symbol(func, Decl(awaitCallExpression3_es6.ts, 7, 31))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
before();
|
||||
>before : Symbol(before, Decl(awaitCallExpression3_es6.ts, 5, 84))
|
||||
|
||||
@@ -4,7 +4,7 @@ declare var a: boolean;
|
||||
|
||||
declare var p: Promise<boolean>;
|
||||
>p : Symbol(p, Decl(awaitCallExpression4_es6.ts, 1, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression4_es6.ts, 1, 32))
|
||||
@@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; };
|
||||
|
||||
declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>pfn : Symbol(pfn, Decl(awaitCallExpression4_es6.ts, 4, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression4_es6.ts, 4, 28))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression4_es6.ts, 4, 42))
|
||||
>arg2 : Symbol(arg2, Decl(awaitCallExpression4_es6.ts, 4, 57))
|
||||
|
||||
declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>po : Symbol(po, Decl(awaitCallExpression4_es6.ts, 5, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression4_es6.ts, 5, 25))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression4_es6.ts, 5, 29))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression4_es6.ts, 5, 43))
|
||||
@@ -42,7 +42,7 @@ declare function after(): void;
|
||||
|
||||
async function func(): Promise<void> {
|
||||
>func : Symbol(func, Decl(awaitCallExpression4_es6.ts, 7, 31))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
before();
|
||||
>before : Symbol(before, Decl(awaitCallExpression4_es6.ts, 5, 84))
|
||||
|
||||
@@ -4,7 +4,7 @@ declare var a: boolean;
|
||||
|
||||
declare var p: Promise<boolean>;
|
||||
>p : Symbol(p, Decl(awaitCallExpression5_es6.ts, 1, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression5_es6.ts, 1, 32))
|
||||
@@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; };
|
||||
|
||||
declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>pfn : Symbol(pfn, Decl(awaitCallExpression5_es6.ts, 4, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression5_es6.ts, 4, 28))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression5_es6.ts, 4, 42))
|
||||
>arg2 : Symbol(arg2, Decl(awaitCallExpression5_es6.ts, 4, 57))
|
||||
|
||||
declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>po : Symbol(po, Decl(awaitCallExpression5_es6.ts, 5, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression5_es6.ts, 5, 25))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression5_es6.ts, 5, 29))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression5_es6.ts, 5, 43))
|
||||
@@ -42,7 +42,7 @@ declare function after(): void;
|
||||
|
||||
async function func(): Promise<void> {
|
||||
>func : Symbol(func, Decl(awaitCallExpression5_es6.ts, 7, 31))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
before();
|
||||
>before : Symbol(before, Decl(awaitCallExpression5_es6.ts, 5, 84))
|
||||
|
||||
@@ -4,7 +4,7 @@ declare var a: boolean;
|
||||
|
||||
declare var p: Promise<boolean>;
|
||||
>p : Symbol(p, Decl(awaitCallExpression6_es6.ts, 1, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression6_es6.ts, 1, 32))
|
||||
@@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; };
|
||||
|
||||
declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>pfn : Symbol(pfn, Decl(awaitCallExpression6_es6.ts, 4, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression6_es6.ts, 4, 28))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression6_es6.ts, 4, 42))
|
||||
>arg2 : Symbol(arg2, Decl(awaitCallExpression6_es6.ts, 4, 57))
|
||||
|
||||
declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>po : Symbol(po, Decl(awaitCallExpression6_es6.ts, 5, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression6_es6.ts, 5, 25))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression6_es6.ts, 5, 29))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression6_es6.ts, 5, 43))
|
||||
@@ -42,7 +42,7 @@ declare function after(): void;
|
||||
|
||||
async function func(): Promise<void> {
|
||||
>func : Symbol(func, Decl(awaitCallExpression6_es6.ts, 7, 31))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
before();
|
||||
>before : Symbol(before, Decl(awaitCallExpression6_es6.ts, 5, 84))
|
||||
|
||||
@@ -4,7 +4,7 @@ declare var a: boolean;
|
||||
|
||||
declare var p: Promise<boolean>;
|
||||
>p : Symbol(p, Decl(awaitCallExpression7_es6.ts, 1, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression7_es6.ts, 1, 32))
|
||||
@@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; };
|
||||
|
||||
declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>pfn : Symbol(pfn, Decl(awaitCallExpression7_es6.ts, 4, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression7_es6.ts, 4, 28))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression7_es6.ts, 4, 42))
|
||||
>arg2 : Symbol(arg2, Decl(awaitCallExpression7_es6.ts, 4, 57))
|
||||
|
||||
declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>po : Symbol(po, Decl(awaitCallExpression7_es6.ts, 5, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression7_es6.ts, 5, 25))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression7_es6.ts, 5, 29))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression7_es6.ts, 5, 43))
|
||||
@@ -42,7 +42,7 @@ declare function after(): void;
|
||||
|
||||
async function func(): Promise<void> {
|
||||
>func : Symbol(func, Decl(awaitCallExpression7_es6.ts, 7, 31))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
before();
|
||||
>before : Symbol(before, Decl(awaitCallExpression7_es6.ts, 5, 84))
|
||||
|
||||
@@ -4,7 +4,7 @@ declare var a: boolean;
|
||||
|
||||
declare var p: Promise<boolean>;
|
||||
>p : Symbol(p, Decl(awaitCallExpression8_es6.ts, 1, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void;
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression8_es6.ts, 1, 32))
|
||||
@@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; };
|
||||
|
||||
declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>pfn : Symbol(pfn, Decl(awaitCallExpression8_es6.ts, 4, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression8_es6.ts, 4, 28))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression8_es6.ts, 4, 42))
|
||||
>arg2 : Symbol(arg2, Decl(awaitCallExpression8_es6.ts, 4, 57))
|
||||
|
||||
declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>;
|
||||
>po : Symbol(po, Decl(awaitCallExpression8_es6.ts, 5, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>fn : Symbol(fn, Decl(awaitCallExpression8_es6.ts, 5, 25))
|
||||
>arg0 : Symbol(arg0, Decl(awaitCallExpression8_es6.ts, 5, 29))
|
||||
>arg1 : Symbol(arg1, Decl(awaitCallExpression8_es6.ts, 5, 43))
|
||||
@@ -42,7 +42,7 @@ declare function after(): void;
|
||||
|
||||
async function func(): Promise<void> {
|
||||
>func : Symbol(func, Decl(awaitCallExpression8_es6.ts, 7, 31))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
before();
|
||||
>before : Symbol(before, Decl(awaitCallExpression8_es6.ts, 5, 84))
|
||||
|
||||
@@ -4,12 +4,12 @@ declare class C { }
|
||||
|
||||
declare var p: Promise<typeof C>;
|
||||
>p : Symbol(p, Decl(awaitClassExpression_es6.ts, 1, 11))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>C : Symbol(C, Decl(awaitClassExpression_es6.ts, 0, 0))
|
||||
|
||||
async function func(): Promise<void> {
|
||||
>func : Symbol(func, Decl(awaitClassExpression_es6.ts, 1, 33))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
|
||||
>Promise : Symbol(Promise, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
class D extends (await p) {
|
||||
>D : Symbol(D, Decl(awaitClassExpression_es6.ts, 3, 38))
|
||||
|
||||
@@ -4,20 +4,20 @@ declare let a: number | string;
|
||||
|
||||
declare let b: PromiseLike<number> | PromiseLike<string>;
|
||||
>b : Symbol(b, Decl(awaitUnion_es6.ts, 1, 11))
|
||||
>PromiseLike : Symbol(PromiseLike, Decl(lib.es5.d.ts, --, --))
|
||||
>PromiseLike : Symbol(PromiseLike, Decl(lib.es5.d.ts, --, --))
|
||||
>PromiseLike : Symbol(PromiseLike, Decl(lib.es6.d.ts, --, --))
|
||||
>PromiseLike : Symbol(PromiseLike, Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
declare let c: PromiseLike<number | string>;
|
||||
>c : Symbol(c, Decl(awaitUnion_es6.ts, 2, 11))
|
||||
>PromiseLike : Symbol(PromiseLike, Decl(lib.es5.d.ts, --, --))
|
||||
>PromiseLike : Symbol(PromiseLike, Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
declare let d: number | PromiseLike<string>;
|
||||
>d : Symbol(d, Decl(awaitUnion_es6.ts, 3, 11))
|
||||
>PromiseLike : Symbol(PromiseLike, Decl(lib.es5.d.ts, --, --))
|
||||
>PromiseLike : Symbol(PromiseLike, Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
declare let e: number | PromiseLike<number | string>;
|
||||
>e : Symbol(e, Decl(awaitUnion_es6.ts, 4, 11))
|
||||
>PromiseLike : Symbol(PromiseLike, Decl(lib.es5.d.ts, --, --))
|
||||
>PromiseLike : Symbol(PromiseLike, Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
async function f() {
|
||||
>f : Symbol(f, Decl(awaitUnion_es6.ts, 4, 53))
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
tests/cases/compiler/bindingPatternInParameter01.ts(4,3): error TS2304: Cannot find name 'console'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/bindingPatternInParameter01.ts (1 errors) ====
|
||||
const nestedArray = [[[1, 2]], [[3, 4]]];
|
||||
|
||||
nestedArray.forEach(([[a, b]]) => {
|
||||
console.log(a, b);
|
||||
~~~~~~~
|
||||
!!! error TS2304: Cannot find name 'console'.
|
||||
});
|
||||
|
||||
@@ -10,6 +10,9 @@ nestedArray.forEach(([[a, b]]) => {
|
||||
>b : Symbol(b, Decl(bindingPatternInParameter01.ts, 2, 25))
|
||||
|
||||
console.log(a, b);
|
||||
>console.log : Symbol(Console.log, Decl(lib.d.ts, --, --))
|
||||
>console : Symbol(console, Decl(lib.d.ts, --, --))
|
||||
>log : Symbol(Console.log, Decl(lib.d.ts, --, --))
|
||||
>a : Symbol(a, Decl(bindingPatternInParameter01.ts, 2, 23))
|
||||
>b : Symbol(b, Decl(bindingPatternInParameter01.ts, 2, 25))
|
||||
|
||||
|
||||
@@ -21,10 +21,10 @@ nestedArray.forEach(([[a, b]]) => {
|
||||
>b : number
|
||||
|
||||
console.log(a, b);
|
||||
>console.log(a, b) : any
|
||||
>console.log : any
|
||||
>console : any
|
||||
>log : any
|
||||
>console.log(a, b) : void
|
||||
>console.log : (message?: any, ...optionalParams: any[]) => void
|
||||
>console : Console
|
||||
>log : (message?: any, ...optionalParams: any[]) => void
|
||||
>a : number
|
||||
>b : number
|
||||
|
||||
|
||||
@@ -21,12 +21,12 @@ module Test {
|
||||
>name : Symbol(name, Decl(binopAssignmentShouldHaveType.ts, 8, 6))
|
||||
|
||||
if ((name= this.getName()).length > 0) {
|
||||
>(name= this.getName()).length : Symbol(String.length, Decl(lib.d.ts, --, --))
|
||||
>(name= this.getName()).length : Symbol(String.length, Decl(lib.es5.d.ts, --, --))
|
||||
>name : Symbol(name, Decl(binopAssignmentShouldHaveType.ts, 8, 6))
|
||||
>this.getName : Symbol(Bug.getName, Decl(binopAssignmentShouldHaveType.ts, 3, 19))
|
||||
>this : Symbol(Bug, Decl(binopAssignmentShouldHaveType.ts, 2, 13))
|
||||
>getName : Symbol(Bug.getName, Decl(binopAssignmentShouldHaveType.ts, 3, 19))
|
||||
>length : Symbol(String.length, Decl(lib.d.ts, --, --))
|
||||
>length : Symbol(String.length, Decl(lib.es5.d.ts, --, --))
|
||||
|
||||
console.log(name);
|
||||
>console : Symbol(console, Decl(binopAssignmentShouldHaveType.ts, 0, 11))
|
||||
|
||||
@@ -195,8 +195,8 @@ interface A { // T
|
||||
|
||||
(a: Date): Date;
|
||||
>a : Symbol(a, Decl(callSignatureAssignabilityInInheritance2.ts, 42, 13))
|
||||
>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
}): any[];
|
||||
};
|
||||
|
||||
@@ -93,7 +93,7 @@ xa[1].foo(1, 2, ...a, "abc");
|
||||
>a : Symbol(a, Decl(callWithSpreadES6.ts, 7, 3))
|
||||
|
||||
(<Function>xa[1].foo)(...[1, 2, "abc"]);
|
||||
>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --), Decl(lib.es6.d.ts, --, --))
|
||||
>xa[1].foo : Symbol(X.foo, Decl(callWithSpreadES6.ts, 0, 13))
|
||||
>xa : Symbol(xa, Decl(callWithSpreadES6.ts, 10, 3))
|
||||
>foo : Symbol(X.foo, Decl(callWithSpreadES6.ts, 0, 13))
|
||||
|
||||
@@ -9,9 +9,9 @@ function foo0(x) {
|
||||
|
||||
let a = arguments.length;
|
||||
>a : Symbol(a, Decl(capturedLetConstInLoop2_ES6.ts, 3, 11))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
>arguments : Symbol(arguments)
|
||||
>length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
(function() { return x + a });
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop2_ES6.ts, 2, 12))
|
||||
@@ -32,9 +32,9 @@ function foo0_1(x) {
|
||||
|
||||
let a = arguments.length;
|
||||
>a : Symbol(a, Decl(capturedLetConstInLoop2_ES6.ts, 11, 11))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
>arguments : Symbol(arguments)
|
||||
>length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
(function() { return x + a });
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop2_ES6.ts, 10, 12))
|
||||
@@ -57,9 +57,9 @@ function foo1(x) {
|
||||
|
||||
let a = arguments.length;
|
||||
>a : Symbol(a, Decl(capturedLetConstInLoop2_ES6.ts, 19, 11))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
>arguments : Symbol(arguments)
|
||||
>length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
(function() { return x + a });
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop2_ES6.ts, 18, 12))
|
||||
@@ -78,9 +78,9 @@ function foo2(x) {
|
||||
while (1 === 1) {
|
||||
let a = arguments.length;
|
||||
>a : Symbol(a, Decl(capturedLetConstInLoop2_ES6.ts, 27, 11))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
>arguments : Symbol(arguments)
|
||||
>length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
(function() { return x + a });
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop2_ES6.ts, 25, 14))
|
||||
@@ -102,9 +102,9 @@ function foo3(x) {
|
||||
|
||||
let a = arguments.length;
|
||||
>a : Symbol(a, Decl(capturedLetConstInLoop2_ES6.ts, 36, 11))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
>arguments : Symbol(arguments)
|
||||
>length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
(function() { return x + a });
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop2_ES6.ts, 35, 11))
|
||||
@@ -128,9 +128,9 @@ function foo4(x) {
|
||||
|
||||
let a = arguments.length;
|
||||
>a : Symbol(a, Decl(capturedLetConstInLoop2_ES6.ts, 44, 11))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
>arguments : Symbol(arguments)
|
||||
>length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
let x = 1;
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop2_ES6.ts, 45, 11))
|
||||
@@ -157,9 +157,9 @@ function foo5(x) {
|
||||
|
||||
let a = arguments.length;
|
||||
>a : Symbol(a, Decl(capturedLetConstInLoop2_ES6.ts, 53, 11))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
>arguments : Symbol(arguments)
|
||||
>length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
(function() { return x + y + a });
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop2_ES6.ts, 52, 12))
|
||||
@@ -185,9 +185,9 @@ function foo6(x) {
|
||||
|
||||
let a = arguments.length;
|
||||
>a : Symbol(a, Decl(capturedLetConstInLoop2_ES6.ts, 63, 11))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
>arguments : Symbol(arguments)
|
||||
>length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
(function() { return x + y + a });
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop2_ES6.ts, 62, 11))
|
||||
@@ -212,9 +212,9 @@ function foo7(x) {
|
||||
|
||||
let a = arguments.length;
|
||||
>a : Symbol(a, Decl(capturedLetConstInLoop2_ES6.ts, 72, 11))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
>arguments : Symbol(arguments)
|
||||
>length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
(function() { return x + y + a });
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop2_ES6.ts, 71, 11))
|
||||
@@ -244,9 +244,9 @@ function foo8(x) {
|
||||
|
||||
let a = arguments.length;
|
||||
>a : Symbol(a, Decl(capturedLetConstInLoop2_ES6.ts, 82, 11))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
>arguments : Symbol(arguments)
|
||||
>length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
(function() { return x + y + a });
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop2_ES6.ts, 81, 11))
|
||||
@@ -269,9 +269,9 @@ function foo0_c(x) {
|
||||
|
||||
const a = arguments.length;
|
||||
>a : Symbol(a, Decl(capturedLetConstInLoop2_ES6.ts, 90, 13))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
>arguments : Symbol(arguments)
|
||||
>length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
(function() { return x + a });
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop2_ES6.ts, 89, 14))
|
||||
@@ -292,9 +292,9 @@ function foo0_1_c(x) {
|
||||
|
||||
const a = arguments.length;
|
||||
>a : Symbol(a, Decl(capturedLetConstInLoop2_ES6.ts, 98, 13))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
>arguments : Symbol(arguments)
|
||||
>length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
(function() { return x + a });
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop2_ES6.ts, 97, 14))
|
||||
@@ -316,9 +316,9 @@ function foo1_c(x) {
|
||||
|
||||
const a = arguments.length;
|
||||
>a : Symbol(a, Decl(capturedLetConstInLoop2_ES6.ts, 106, 13))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
>arguments : Symbol(arguments)
|
||||
>length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
(function() { return x + a });
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop2_ES6.ts, 105, 14))
|
||||
@@ -337,9 +337,9 @@ function foo2_c(x) {
|
||||
while (1 === 1) {
|
||||
const a = arguments.length;
|
||||
>a : Symbol(a, Decl(capturedLetConstInLoop2_ES6.ts, 114, 13))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
>arguments : Symbol(arguments)
|
||||
>length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
(function() { return x + a });
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop2_ES6.ts, 112, 16))
|
||||
@@ -361,9 +361,9 @@ function foo3_c(x) {
|
||||
|
||||
const a = arguments.length;
|
||||
>a : Symbol(a, Decl(capturedLetConstInLoop2_ES6.ts, 123, 13))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
>arguments : Symbol(arguments)
|
||||
>length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
(function() { return x + a });
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop2_ES6.ts, 122, 13))
|
||||
@@ -386,9 +386,9 @@ function foo4_c(x) {
|
||||
|
||||
const a = arguments.length;
|
||||
>a : Symbol(a, Decl(capturedLetConstInLoop2_ES6.ts, 131, 13))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
>arguments : Symbol(arguments)
|
||||
>length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
const x = 1;
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop2_ES6.ts, 132, 13))
|
||||
@@ -414,9 +414,9 @@ function foo5_c(x) {
|
||||
|
||||
const a = arguments.length;
|
||||
>a : Symbol(a, Decl(capturedLetConstInLoop2_ES6.ts, 140, 13))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
>arguments : Symbol(arguments)
|
||||
>length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
(function() { return x + y + a });
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop2_ES6.ts, 139, 14))
|
||||
@@ -442,9 +442,9 @@ function foo6_c(x) {
|
||||
|
||||
const a = arguments.length;
|
||||
>a : Symbol(a, Decl(capturedLetConstInLoop2_ES6.ts, 150, 13))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
>arguments : Symbol(arguments)
|
||||
>length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
(function() { return x + y + a });
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop2_ES6.ts, 149, 13))
|
||||
@@ -469,9 +469,9 @@ function foo7_c(x) {
|
||||
|
||||
const a = arguments.length;
|
||||
>a : Symbol(a, Decl(capturedLetConstInLoop2_ES6.ts, 159, 13))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
>arguments : Symbol(arguments)
|
||||
>length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
(function() { return x + y + a });
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop2_ES6.ts, 158, 13))
|
||||
@@ -500,9 +500,9 @@ function foo8_c(x) {
|
||||
|
||||
const a = arguments.length;
|
||||
>a : Symbol(a, Decl(capturedLetConstInLoop2_ES6.ts, 169, 13))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
>arguments : Symbol(arguments)
|
||||
>length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
(function() { return x + y + a });
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop2_ES6.ts, 168, 13))
|
||||
|
||||
@@ -126,9 +126,9 @@ function foo() {
|
||||
>z1 : Symbol(z1, Decl(capturedLetConstInLoop9_ES6.ts, 67, 21))
|
||||
>x1 : Symbol(x1, Decl(capturedLetConstInLoop9_ES6.ts, 67, 33))
|
||||
>y : Symbol(y, Decl(capturedLetConstInLoop9_ES6.ts, 67, 38))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
>arguments : Symbol(arguments)
|
||||
>length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
if (b === 1) {
|
||||
>b : Symbol(b, Decl(capturedLetConstInLoop9_ES6.ts, 66, 16))
|
||||
@@ -246,24 +246,24 @@ function foo3 () {
|
||||
|
||||
let x = arguments.length;
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop9_ES6.ts, 131, 7))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
>arguments : Symbol(arguments)
|
||||
>length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
for (let y of []) {
|
||||
>y : Symbol(y, Decl(capturedLetConstInLoop9_ES6.ts, 132, 12))
|
||||
|
||||
let z = arguments.length;
|
||||
>z : Symbol(z, Decl(capturedLetConstInLoop9_ES6.ts, 133, 11))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
>arguments : Symbol(arguments)
|
||||
>length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
|
||||
(function() { return y + z + arguments.length; });
|
||||
>y : Symbol(y, Decl(capturedLetConstInLoop9_ES6.ts, 132, 12))
|
||||
>z : Symbol(z, Decl(capturedLetConstInLoop9_ES6.ts, 133, 11))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>arguments.length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
>arguments : Symbol(arguments)
|
||||
>length : Symbol(IArguments.length, Decl(lib.es5.d.ts, --, --))
|
||||
>length : Symbol(IArguments.length, Decl(lib.es6.d.ts, --, --))
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@ var c: boolean;
|
||||
|
||||
var d: Date;
|
||||
>d : Symbol(d, Decl(chainedAssignment2.ts, 3, 3))
|
||||
>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
var e: RegExp;
|
||||
>e : Symbol(e, Decl(chainedAssignment2.ts, 4, 3))
|
||||
|
||||
@@ -12,9 +12,9 @@ for (let i = 0; i < 3; i++) {
|
||||
>i : Symbol(i, Decl(classExpressionWithStaticProperties3.ts, 2, 8))
|
||||
|
||||
arr.push(class C {
|
||||
>arr.push : Symbol(Array.push, Decl(lib.d.ts, --, --))
|
||||
>arr.push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --))
|
||||
>arr : Symbol(arr, Decl(classExpressionWithStaticProperties3.ts, 1, 5))
|
||||
>push : Symbol(Array.push, Decl(lib.d.ts, --, --))
|
||||
>push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --))
|
||||
>C : Symbol(C, Decl(classExpressionWithStaticProperties3.ts, 3, 13))
|
||||
|
||||
static x = i;
|
||||
@@ -30,9 +30,9 @@ for (let i = 0; i < 3; i++) {
|
||||
});
|
||||
}
|
||||
arr.forEach(C => console.log(C.y()));
|
||||
>arr.forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --))
|
||||
>arr.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --))
|
||||
>arr : Symbol(arr, Decl(classExpressionWithStaticProperties3.ts, 1, 5))
|
||||
>forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --))
|
||||
>forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --))
|
||||
>C : Symbol(C, Decl(classExpressionWithStaticProperties3.ts, 8, 12))
|
||||
>console : Symbol(console, Decl(classExpressionWithStaticProperties3.ts, 0, 11))
|
||||
>C.y : Symbol(y, Decl(classExpressionWithStaticProperties3.ts, 1, 12))
|
||||
|
||||
@@ -21,7 +21,7 @@ class C5 extends Number { }
|
||||
|
||||
class C6 extends Date { }
|
||||
>C6 : Symbol(C6, Decl(classExtendingBuiltinType.ts, 4, 27))
|
||||
>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
class C7 extends RegExp { }
|
||||
>C7 : Symbol(C7, Decl(classExtendingBuiltinType.ts, 5, 25))
|
||||
|
||||
@@ -20,7 +20,7 @@ var c2 = new C(null); // error
|
||||
class D<T extends Date> {
|
||||
>D : Symbol(D, Decl(classWithoutExplicitConstructor.ts, 6, 21))
|
||||
>T : Symbol(T, Decl(classWithoutExplicitConstructor.ts, 8, 8))
|
||||
>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
x = 2
|
||||
>x : Symbol(D.x, Decl(classWithoutExplicitConstructor.ts, 8, 25))
|
||||
|
||||
Loaded 100 of 790 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user