This commit is contained in:
Paul van Brenk 2015-04-22 13:05:07 -07:00
commit c6a9c8fa89
108 changed files with 1671 additions and 508 deletions

46
bin/lib.d.ts vendored
View file

@ -13878,7 +13878,7 @@ interface SourceBuffer extends EventTarget {
videoTracks: VideoTrackList;
abort(): void;
appendBuffer(data: ArrayBuffer): void;
appendBuffer(data: any): void;
appendBuffer(data: ArrayBufferView): void;
appendStream(stream: MSStream, maxSize?: number): void;
remove(start: number, end: number): void;
}
@ -13986,31 +13986,31 @@ declare var StyleSheetPageList: {
}
interface SubtleCrypto {
decrypt(algorithm: string, key: CryptoKey, data: any): any;
decrypt(algorithm: Algorithm, key: CryptoKey, data: any): any;
decrypt(algorithm: string, key: CryptoKey, data: ArrayBufferView): any;
decrypt(algorithm: Algorithm, key: CryptoKey, data: ArrayBufferView): any;
deriveBits(algorithm: string, baseKey: CryptoKey, length: number): any;
deriveBits(algorithm: Algorithm, baseKey: CryptoKey, length: number): any;
deriveKey(algorithm: string, baseKey: CryptoKey, derivedKeyType: string, extractable: boolean, keyUsages: string[]): any;
deriveKey(algorithm: string, baseKey: CryptoKey, derivedKeyType: Algorithm, extractable: boolean, keyUsages: string[]): any;
deriveKey(algorithm: Algorithm, baseKey: CryptoKey, derivedKeyType: string, extractable: boolean, keyUsages: string[]): any;
deriveKey(algorithm: Algorithm, baseKey: CryptoKey, derivedKeyType: Algorithm, extractable: boolean, keyUsages: string[]): any;
digest(algorithm: string, data: any): any;
digest(algorithm: Algorithm, data: any): any;
encrypt(algorithm: string, key: CryptoKey, data: any): any;
encrypt(algorithm: Algorithm, key: CryptoKey, data: any): any;
digest(algorithm: string, data: ArrayBufferView): any;
digest(algorithm: Algorithm, data: ArrayBufferView): any;
encrypt(algorithm: string, key: CryptoKey, data: ArrayBufferView): any;
encrypt(algorithm: Algorithm, key: CryptoKey, data: ArrayBufferView): any;
exportKey(format: string, key: CryptoKey): any;
generateKey(algorithm: string, extractable: boolean, keyUsages: string[]): any;
generateKey(algorithm: Algorithm, extractable: boolean, keyUsages: string[]): any;
importKey(format: string, keyData: any, algorithm: string, extractable: boolean, keyUsages: string[]): any;
importKey(format: string, keyData: any, algorithm: Algorithm, extractable: boolean, keyUsages: string[]): any;
sign(algorithm: string, key: CryptoKey, data: any): any;
sign(algorithm: Algorithm, key: CryptoKey, data: any): any;
unwrapKey(format: string, wrappedKey: any, unwrappingKey: CryptoKey, unwrapAlgorithm: string, unwrappedKeyAlgorithm: string, extractable: boolean, keyUsages: string[]): any;
unwrapKey(format: string, wrappedKey: any, unwrappingKey: CryptoKey, unwrapAlgorithm: string, unwrappedKeyAlgorithm: Algorithm, extractable: boolean, keyUsages: string[]): any;
unwrapKey(format: string, wrappedKey: any, unwrappingKey: CryptoKey, unwrapAlgorithm: Algorithm, unwrappedKeyAlgorithm: string, extractable: boolean, keyUsages: string[]): any;
unwrapKey(format: string, wrappedKey: any, unwrappingKey: CryptoKey, unwrapAlgorithm: Algorithm, unwrappedKeyAlgorithm: Algorithm, extractable: boolean, keyUsages: string[]): any;
verify(algorithm: string, key: CryptoKey, signature: any, data: any): any;
verify(algorithm: Algorithm, key: CryptoKey, signature: any, data: any): any;
importKey(format: string, keyData: ArrayBufferView, algorithm: string, extractable: boolean, keyUsages: string[]): any;
importKey(format: string, keyData: ArrayBufferView, algorithm: Algorithm, extractable: boolean, keyUsages: string[]): any;
sign(algorithm: string, key: CryptoKey, data: ArrayBufferView): any;
sign(algorithm: Algorithm, key: CryptoKey, data: ArrayBufferView): any;
unwrapKey(format: string, wrappedKey: ArrayBufferView, unwrappingKey: CryptoKey, unwrapAlgorithm: string, unwrappedKeyAlgorithm: string, extractable: boolean, keyUsages: string[]): any;
unwrapKey(format: string, wrappedKey: ArrayBufferView, unwrappingKey: CryptoKey, unwrapAlgorithm: string, unwrappedKeyAlgorithm: Algorithm, extractable: boolean, keyUsages: string[]): any;
unwrapKey(format: string, wrappedKey: ArrayBufferView, unwrappingKey: CryptoKey, unwrapAlgorithm: Algorithm, unwrappedKeyAlgorithm: string, extractable: boolean, keyUsages: string[]): any;
unwrapKey(format: string, wrappedKey: ArrayBufferView, unwrappingKey: CryptoKey, unwrapAlgorithm: Algorithm, unwrappedKeyAlgorithm: Algorithm, extractable: boolean, keyUsages: string[]): any;
verify(algorithm: string, key: CryptoKey, signature: ArrayBufferView, data: ArrayBufferView): any;
verify(algorithm: Algorithm, key: CryptoKey, signature: ArrayBufferView, data: ArrayBufferView): any;
wrapKey(format: string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: string): any;
wrapKey(format: string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: Algorithm): any;
}
@ -14522,9 +14522,9 @@ interface WebGLRenderingContext {
blendFunc(sfactor: number, dfactor: number): void;
blendFuncSeparate(srcRGB: number, dstRGB: number, srcAlpha: number, dstAlpha: number): void;
bufferData(target: number, size: number, usage: number): void;
bufferData(target: number, size: ArrayBufferView, usage: number): void;
bufferData(target: number, size: any, usage: number): void;
bufferData(target: number, size: any, usage: number): void;
bufferSubData(target: number, offset: number, data: any): void;
bufferSubData(target: number, offset: number, data: ArrayBufferView): void;
bufferSubData(target: number, offset: number, data: any): void;
checkFramebufferStatus(target: number): number;
clear(mask: number): void;
@ -14533,8 +14533,8 @@ interface WebGLRenderingContext {
clearStencil(s: number): void;
colorMask(red: boolean, green: boolean, blue: boolean, alpha: boolean): void;
compileShader(shader: WebGLShader): void;
compressedTexImage2D(target: number, level: number, internalformat: number, width: number, height: number, border: number, data: any): void;
compressedTexSubImage2D(target: number, level: number, xoffset: number, yoffset: number, width: number, height: number, format: number, data: any): void;
compressedTexImage2D(target: number, level: number, internalformat: number, width: number, height: number, border: number, data: ArrayBufferView): void;
compressedTexSubImage2D(target: number, level: number, xoffset: number, yoffset: number, width: number, height: number, format: number, data: ArrayBufferView): void;
copyTexImage2D(target: number, level: number, internalformat: number, x: number, y: number, width: number, height: number, border: number): void;
copyTexSubImage2D(target: number, level: number, xoffset: number, yoffset: number, x: number, y: number, width: number, height: number): void;
createBuffer(): WebGLBuffer;
@ -14602,7 +14602,7 @@ interface WebGLRenderingContext {
linkProgram(program: WebGLProgram): void;
pixelStorei(pname: number, param: number): void;
polygonOffset(factor: number, units: number): void;
readPixels(x: number, y: number, width: number, height: number, format: number, type: number, pixels: any): void;
readPixels(x: number, y: number, width: number, height: number, format: number, type: number, pixels: ArrayBufferView): void;
renderbufferStorage(target: number, internalformat: number, width: number, height: number): void;
sampleCoverage(value: number, invert: boolean): void;
scissor(x: number, y: number, width: number, height: number): void;
@ -16026,7 +16026,7 @@ interface NodeSelector {
}
interface RandomSource {
getRandomValues(array: any): any;
getRandomValues(array: ArrayBufferView): ArrayBufferView;
}
interface SVGAnimatedPathData {

46
bin/lib.dom.d.ts vendored
View file

@ -12708,7 +12708,7 @@ interface SourceBuffer extends EventTarget {
videoTracks: VideoTrackList;
abort(): void;
appendBuffer(data: ArrayBuffer): void;
appendBuffer(data: any): void;
appendBuffer(data: ArrayBufferView): void;
appendStream(stream: MSStream, maxSize?: number): void;
remove(start: number, end: number): void;
}
@ -12816,31 +12816,31 @@ declare var StyleSheetPageList: {
}
interface SubtleCrypto {
decrypt(algorithm: string, key: CryptoKey, data: any): any;
decrypt(algorithm: Algorithm, key: CryptoKey, data: any): any;
decrypt(algorithm: string, key: CryptoKey, data: ArrayBufferView): any;
decrypt(algorithm: Algorithm, key: CryptoKey, data: ArrayBufferView): any;
deriveBits(algorithm: string, baseKey: CryptoKey, length: number): any;
deriveBits(algorithm: Algorithm, baseKey: CryptoKey, length: number): any;
deriveKey(algorithm: string, baseKey: CryptoKey, derivedKeyType: string, extractable: boolean, keyUsages: string[]): any;
deriveKey(algorithm: string, baseKey: CryptoKey, derivedKeyType: Algorithm, extractable: boolean, keyUsages: string[]): any;
deriveKey(algorithm: Algorithm, baseKey: CryptoKey, derivedKeyType: string, extractable: boolean, keyUsages: string[]): any;
deriveKey(algorithm: Algorithm, baseKey: CryptoKey, derivedKeyType: Algorithm, extractable: boolean, keyUsages: string[]): any;
digest(algorithm: string, data: any): any;
digest(algorithm: Algorithm, data: any): any;
encrypt(algorithm: string, key: CryptoKey, data: any): any;
encrypt(algorithm: Algorithm, key: CryptoKey, data: any): any;
digest(algorithm: string, data: ArrayBufferView): any;
digest(algorithm: Algorithm, data: ArrayBufferView): any;
encrypt(algorithm: string, key: CryptoKey, data: ArrayBufferView): any;
encrypt(algorithm: Algorithm, key: CryptoKey, data: ArrayBufferView): any;
exportKey(format: string, key: CryptoKey): any;
generateKey(algorithm: string, extractable: boolean, keyUsages: string[]): any;
generateKey(algorithm: Algorithm, extractable: boolean, keyUsages: string[]): any;
importKey(format: string, keyData: any, algorithm: string, extractable: boolean, keyUsages: string[]): any;
importKey(format: string, keyData: any, algorithm: Algorithm, extractable: boolean, keyUsages: string[]): any;
sign(algorithm: string, key: CryptoKey, data: any): any;
sign(algorithm: Algorithm, key: CryptoKey, data: any): any;
unwrapKey(format: string, wrappedKey: any, unwrappingKey: CryptoKey, unwrapAlgorithm: string, unwrappedKeyAlgorithm: string, extractable: boolean, keyUsages: string[]): any;
unwrapKey(format: string, wrappedKey: any, unwrappingKey: CryptoKey, unwrapAlgorithm: string, unwrappedKeyAlgorithm: Algorithm, extractable: boolean, keyUsages: string[]): any;
unwrapKey(format: string, wrappedKey: any, unwrappingKey: CryptoKey, unwrapAlgorithm: Algorithm, unwrappedKeyAlgorithm: string, extractable: boolean, keyUsages: string[]): any;
unwrapKey(format: string, wrappedKey: any, unwrappingKey: CryptoKey, unwrapAlgorithm: Algorithm, unwrappedKeyAlgorithm: Algorithm, extractable: boolean, keyUsages: string[]): any;
verify(algorithm: string, key: CryptoKey, signature: any, data: any): any;
verify(algorithm: Algorithm, key: CryptoKey, signature: any, data: any): any;
importKey(format: string, keyData: ArrayBufferView, algorithm: string, extractable: boolean, keyUsages: string[]): any;
importKey(format: string, keyData: ArrayBufferView, algorithm: Algorithm, extractable: boolean, keyUsages: string[]): any;
sign(algorithm: string, key: CryptoKey, data: ArrayBufferView): any;
sign(algorithm: Algorithm, key: CryptoKey, data: ArrayBufferView): any;
unwrapKey(format: string, wrappedKey: ArrayBufferView, unwrappingKey: CryptoKey, unwrapAlgorithm: string, unwrappedKeyAlgorithm: string, extractable: boolean, keyUsages: string[]): any;
unwrapKey(format: string, wrappedKey: ArrayBufferView, unwrappingKey: CryptoKey, unwrapAlgorithm: string, unwrappedKeyAlgorithm: Algorithm, extractable: boolean, keyUsages: string[]): any;
unwrapKey(format: string, wrappedKey: ArrayBufferView, unwrappingKey: CryptoKey, unwrapAlgorithm: Algorithm, unwrappedKeyAlgorithm: string, extractable: boolean, keyUsages: string[]): any;
unwrapKey(format: string, wrappedKey: ArrayBufferView, unwrappingKey: CryptoKey, unwrapAlgorithm: Algorithm, unwrappedKeyAlgorithm: Algorithm, extractable: boolean, keyUsages: string[]): any;
verify(algorithm: string, key: CryptoKey, signature: ArrayBufferView, data: ArrayBufferView): any;
verify(algorithm: Algorithm, key: CryptoKey, signature: ArrayBufferView, data: ArrayBufferView): any;
wrapKey(format: string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: string): any;
wrapKey(format: string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: Algorithm): any;
}
@ -13352,9 +13352,9 @@ interface WebGLRenderingContext {
blendFunc(sfactor: number, dfactor: number): void;
blendFuncSeparate(srcRGB: number, dstRGB: number, srcAlpha: number, dstAlpha: number): void;
bufferData(target: number, size: number, usage: number): void;
bufferData(target: number, size: ArrayBufferView, usage: number): void;
bufferData(target: number, size: any, usage: number): void;
bufferData(target: number, size: any, usage: number): void;
bufferSubData(target: number, offset: number, data: any): void;
bufferSubData(target: number, offset: number, data: ArrayBufferView): void;
bufferSubData(target: number, offset: number, data: any): void;
checkFramebufferStatus(target: number): number;
clear(mask: number): void;
@ -13363,8 +13363,8 @@ interface WebGLRenderingContext {
clearStencil(s: number): void;
colorMask(red: boolean, green: boolean, blue: boolean, alpha: boolean): void;
compileShader(shader: WebGLShader): void;
compressedTexImage2D(target: number, level: number, internalformat: number, width: number, height: number, border: number, data: any): void;
compressedTexSubImage2D(target: number, level: number, xoffset: number, yoffset: number, width: number, height: number, format: number, data: any): void;
compressedTexImage2D(target: number, level: number, internalformat: number, width: number, height: number, border: number, data: ArrayBufferView): void;
compressedTexSubImage2D(target: number, level: number, xoffset: number, yoffset: number, width: number, height: number, format: number, data: ArrayBufferView): void;
copyTexImage2D(target: number, level: number, internalformat: number, x: number, y: number, width: number, height: number, border: number): void;
copyTexSubImage2D(target: number, level: number, xoffset: number, yoffset: number, x: number, y: number, width: number, height: number): void;
createBuffer(): WebGLBuffer;
@ -13432,7 +13432,7 @@ interface WebGLRenderingContext {
linkProgram(program: WebGLProgram): void;
pixelStorei(pname: number, param: number): void;
polygonOffset(factor: number, units: number): void;
readPixels(x: number, y: number, width: number, height: number, format: number, type: number, pixels: any): void;
readPixels(x: number, y: number, width: number, height: number, format: number, type: number, pixels: ArrayBufferView): void;
renderbufferStorage(target: number, internalformat: number, width: number, height: number): void;
sampleCoverage(value: number, invert: boolean): void;
scissor(x: number, y: number, width: number, height: number): void;
@ -14856,7 +14856,7 @@ interface NodeSelector {
}
interface RandomSource {
getRandomValues(array: any): any;
getRandomValues(array: ArrayBufferView): ArrayBufferView;
}
interface SVGAnimatedPathData {

46
bin/lib.es6.d.ts vendored
View file

@ -15356,7 +15356,7 @@ interface SourceBuffer extends EventTarget {
videoTracks: VideoTrackList;
abort(): void;
appendBuffer(data: ArrayBuffer): void;
appendBuffer(data: any): void;
appendBuffer(data: ArrayBufferView): void;
appendStream(stream: MSStream, maxSize?: number): void;
remove(start: number, end: number): void;
}
@ -15464,31 +15464,31 @@ declare var StyleSheetPageList: {
}
interface SubtleCrypto {
decrypt(algorithm: string, key: CryptoKey, data: any): any;
decrypt(algorithm: Algorithm, key: CryptoKey, data: any): any;
decrypt(algorithm: string, key: CryptoKey, data: ArrayBufferView): any;
decrypt(algorithm: Algorithm, key: CryptoKey, data: ArrayBufferView): any;
deriveBits(algorithm: string, baseKey: CryptoKey, length: number): any;
deriveBits(algorithm: Algorithm, baseKey: CryptoKey, length: number): any;
deriveKey(algorithm: string, baseKey: CryptoKey, derivedKeyType: string, extractable: boolean, keyUsages: string[]): any;
deriveKey(algorithm: string, baseKey: CryptoKey, derivedKeyType: Algorithm, extractable: boolean, keyUsages: string[]): any;
deriveKey(algorithm: Algorithm, baseKey: CryptoKey, derivedKeyType: string, extractable: boolean, keyUsages: string[]): any;
deriveKey(algorithm: Algorithm, baseKey: CryptoKey, derivedKeyType: Algorithm, extractable: boolean, keyUsages: string[]): any;
digest(algorithm: string, data: any): any;
digest(algorithm: Algorithm, data: any): any;
encrypt(algorithm: string, key: CryptoKey, data: any): any;
encrypt(algorithm: Algorithm, key: CryptoKey, data: any): any;
digest(algorithm: string, data: ArrayBufferView): any;
digest(algorithm: Algorithm, data: ArrayBufferView): any;
encrypt(algorithm: string, key: CryptoKey, data: ArrayBufferView): any;
encrypt(algorithm: Algorithm, key: CryptoKey, data: ArrayBufferView): any;
exportKey(format: string, key: CryptoKey): any;
generateKey(algorithm: string, extractable: boolean, keyUsages: string[]): any;
generateKey(algorithm: Algorithm, extractable: boolean, keyUsages: string[]): any;
importKey(format: string, keyData: any, algorithm: string, extractable: boolean, keyUsages: string[]): any;
importKey(format: string, keyData: any, algorithm: Algorithm, extractable: boolean, keyUsages: string[]): any;
sign(algorithm: string, key: CryptoKey, data: any): any;
sign(algorithm: Algorithm, key: CryptoKey, data: any): any;
unwrapKey(format: string, wrappedKey: any, unwrappingKey: CryptoKey, unwrapAlgorithm: string, unwrappedKeyAlgorithm: string, extractable: boolean, keyUsages: string[]): any;
unwrapKey(format: string, wrappedKey: any, unwrappingKey: CryptoKey, unwrapAlgorithm: string, unwrappedKeyAlgorithm: Algorithm, extractable: boolean, keyUsages: string[]): any;
unwrapKey(format: string, wrappedKey: any, unwrappingKey: CryptoKey, unwrapAlgorithm: Algorithm, unwrappedKeyAlgorithm: string, extractable: boolean, keyUsages: string[]): any;
unwrapKey(format: string, wrappedKey: any, unwrappingKey: CryptoKey, unwrapAlgorithm: Algorithm, unwrappedKeyAlgorithm: Algorithm, extractable: boolean, keyUsages: string[]): any;
verify(algorithm: string, key: CryptoKey, signature: any, data: any): any;
verify(algorithm: Algorithm, key: CryptoKey, signature: any, data: any): any;
importKey(format: string, keyData: ArrayBufferView, algorithm: string, extractable: boolean, keyUsages: string[]): any;
importKey(format: string, keyData: ArrayBufferView, algorithm: Algorithm, extractable: boolean, keyUsages: string[]): any;
sign(algorithm: string, key: CryptoKey, data: ArrayBufferView): any;
sign(algorithm: Algorithm, key: CryptoKey, data: ArrayBufferView): any;
unwrapKey(format: string, wrappedKey: ArrayBufferView, unwrappingKey: CryptoKey, unwrapAlgorithm: string, unwrappedKeyAlgorithm: string, extractable: boolean, keyUsages: string[]): any;
unwrapKey(format: string, wrappedKey: ArrayBufferView, unwrappingKey: CryptoKey, unwrapAlgorithm: string, unwrappedKeyAlgorithm: Algorithm, extractable: boolean, keyUsages: string[]): any;
unwrapKey(format: string, wrappedKey: ArrayBufferView, unwrappingKey: CryptoKey, unwrapAlgorithm: Algorithm, unwrappedKeyAlgorithm: string, extractable: boolean, keyUsages: string[]): any;
unwrapKey(format: string, wrappedKey: ArrayBufferView, unwrappingKey: CryptoKey, unwrapAlgorithm: Algorithm, unwrappedKeyAlgorithm: Algorithm, extractable: boolean, keyUsages: string[]): any;
verify(algorithm: string, key: CryptoKey, signature: ArrayBufferView, data: ArrayBufferView): any;
verify(algorithm: Algorithm, key: CryptoKey, signature: ArrayBufferView, data: ArrayBufferView): any;
wrapKey(format: string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: string): any;
wrapKey(format: string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: Algorithm): any;
}
@ -16000,9 +16000,9 @@ interface WebGLRenderingContext {
blendFunc(sfactor: number, dfactor: number): void;
blendFuncSeparate(srcRGB: number, dstRGB: number, srcAlpha: number, dstAlpha: number): void;
bufferData(target: number, size: number, usage: number): void;
bufferData(target: number, size: ArrayBufferView, usage: number): void;
bufferData(target: number, size: any, usage: number): void;
bufferData(target: number, size: any, usage: number): void;
bufferSubData(target: number, offset: number, data: any): void;
bufferSubData(target: number, offset: number, data: ArrayBufferView): void;
bufferSubData(target: number, offset: number, data: any): void;
checkFramebufferStatus(target: number): number;
clear(mask: number): void;
@ -16011,8 +16011,8 @@ interface WebGLRenderingContext {
clearStencil(s: number): void;
colorMask(red: boolean, green: boolean, blue: boolean, alpha: boolean): void;
compileShader(shader: WebGLShader): void;
compressedTexImage2D(target: number, level: number, internalformat: number, width: number, height: number, border: number, data: any): void;
compressedTexSubImage2D(target: number, level: number, xoffset: number, yoffset: number, width: number, height: number, format: number, data: any): void;
compressedTexImage2D(target: number, level: number, internalformat: number, width: number, height: number, border: number, data: ArrayBufferView): void;
compressedTexSubImage2D(target: number, level: number, xoffset: number, yoffset: number, width: number, height: number, format: number, data: ArrayBufferView): void;
copyTexImage2D(target: number, level: number, internalformat: number, x: number, y: number, width: number, height: number, border: number): void;
copyTexSubImage2D(target: number, level: number, xoffset: number, yoffset: number, x: number, y: number, width: number, height: number): void;
createBuffer(): WebGLBuffer;
@ -16080,7 +16080,7 @@ interface WebGLRenderingContext {
linkProgram(program: WebGLProgram): void;
pixelStorei(pname: number, param: number): void;
polygonOffset(factor: number, units: number): void;
readPixels(x: number, y: number, width: number, height: number, format: number, type: number, pixels: any): void;
readPixels(x: number, y: number, width: number, height: number, format: number, type: number, pixels: ArrayBufferView): void;
renderbufferStorage(target: number, internalformat: number, width: number, height: number): void;
sampleCoverage(value: number, invert: boolean): void;
scissor(x: number, y: number, width: number, height: number): void;
@ -17504,7 +17504,7 @@ interface NodeSelector {
}
interface RandomSource {
getRandomValues(array: any): any;
getRandomValues(array: ArrayBufferView): ArrayBufferView;
}
interface SVGAnimatedPathData {

View file

@ -1399,6 +1399,8 @@ var ts;
Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures: { code: 6055, category: ts.DiagnosticCategory.Message, key: "Suppress noImplicitAny errors for indexing objects lacking index signatures." },
Do_not_emit_declarations_for_code_that_has_an_internal_annotation: { code: 6056, category: ts.DiagnosticCategory.Message, key: "Do not emit declarations for code that has an '@internal' annotation." },
Preserve_new_lines_when_emitting_code: { code: 6057, category: ts.DiagnosticCategory.Message, key: "Preserve new-lines when emitting code." },
Specifies_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir: { code: 6058, category: ts.DiagnosticCategory.Message, key: "Specifies the root directory of input files. Use to control the output directory structure with --outDir." },
File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files: { code: 6059, category: ts.DiagnosticCategory.Error, key: "File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files." },
Variable_0_implicitly_has_an_1_type: { code: 7005, category: ts.DiagnosticCategory.Error, key: "Variable '{0}' implicitly has an '{1}' type." },
Parameter_0_implicitly_has_an_1_type: { code: 7006, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' implicitly has an '{1}' type." },
Member_0_implicitly_has_an_1_type: { code: 7008, category: ts.DiagnosticCategory.Error, key: "Member '{0}' implicitly has an '{1}' type." },
@ -11553,7 +11555,7 @@ var ts;
return type;
}
function combineTypeMappers(mapper1, mapper2) {
return function (t) { return mapper2(mapper1(t)); };
return function (t) { return instantiateType(mapper1(t), mapper2); };
}
function instantiateTypeParameter(typeParameter, mapper) {
var result = createType(512);
@ -20156,8 +20158,8 @@ var ts;
ts.isExternalModuleOrDeclarationFile = isExternalModuleOrDeclarationFile;
function emitFiles(resolver, host, targetSourceFile) {
var extendsHelper = "\nvar __extends = this.__extends || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n __.prototype = b.prototype;\n d.prototype = new __();\n};";
var decorateHelper = "\nvar __decorate = this.__decorate || (typeof Reflect === \"object\" && Reflect.decorate) || function (decorators, target, key, desc) {\n switch (arguments.length) {\n case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);\n case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);\n case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc);\n }\n};";
var metadataHelper = "\nvar __metadata = this.__metadata || (typeof Reflect === \"object\" && Reflect.metadata) || function () { };";
var decorateHelper = "\nvar __decorate = this.__decorate || function (decorators, target, key, desc) {\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") return Reflect.decorate(decorators, target, key, desc);\n switch (arguments.length) {\n case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);\n case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);\n case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc);\n }\n};";
var metadataHelper = "\nvar __metadata = this.__metadata || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};";
var paramHelper = "\nvar __param = this.__param || function(index, decorator) { return function (target, key) { decorator(target, key, index); } };";
var compilerOptions = host.getCompilerOptions();
var languageVersion = compilerOptions.target || 0;
@ -24441,7 +24443,7 @@ var ts;
getDiagnosticsProducingTypeChecker: getDiagnosticsProducingTypeChecker,
getCommonSourceDirectory: function () { return commonSourceDirectory; },
emit: emit,
getCurrentDirectory: host.getCurrentDirectory,
getCurrentDirectory: function () { return host.getCurrentDirectory(); },
getNodeCount: function () { return getDiagnosticsProducingTypeChecker().getNodeCount(); },
getIdentifierCount: function () { return getDiagnosticsProducingTypeChecker().getIdentifierCount(); },
getSymbolCount: function () { return getDiagnosticsProducingTypeChecker().getSymbolCount(); },
@ -24450,14 +24452,14 @@ var ts;
return program;
function getEmitHost(writeFileCallback) {
return {
getCanonicalFileName: host.getCanonicalFileName,
getCanonicalFileName: function (fileName) { return host.getCanonicalFileName(fileName); },
getCommonSourceDirectory: program.getCommonSourceDirectory,
getCompilerOptions: program.getCompilerOptions,
getCurrentDirectory: host.getCurrentDirectory,
getNewLine: host.getNewLine,
getCurrentDirectory: function () { return host.getCurrentDirectory(); },
getNewLine: function () { return host.getNewLine(); },
getSourceFile: program.getSourceFile,
getSourceFiles: program.getSourceFiles,
writeFile: writeFileCallback || host.writeFile
writeFile: writeFileCallback || (function (fileName, data, writeByteOrderMark, onError) { return host.writeFile(fileName, data, writeByteOrderMark, onError); })
};
}
function getDiagnosticsProducingTypeChecker() {
@ -24663,6 +24665,53 @@ var ts;
return findSourceFile(fileName, false, file, nameLiteral.pos, nameLiteral.end - nameLiteral.pos);
}
}
function computeCommonSourceDirectory(sourceFiles) {
var commonPathComponents;
var currentDirectory = host.getCurrentDirectory();
ts.forEach(files, function (sourceFile) {
if (ts.isDeclarationFile(sourceFile)) {
return;
}
var sourcePathComponents = ts.getNormalizedPathComponents(sourceFile.fileName, currentDirectory);
sourcePathComponents.pop();
if (!commonPathComponents) {
commonPathComponents = sourcePathComponents;
return;
}
for (var i = 0, n = Math.min(commonPathComponents.length, sourcePathComponents.length); i < n; i++) {
if (commonPathComponents[i] !== sourcePathComponents[i]) {
if (i === 0) {
diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files));
return;
}
commonPathComponents.length = i;
break;
}
}
if (sourcePathComponents.length < commonPathComponents.length) {
commonPathComponents.length = sourcePathComponents.length;
}
});
return ts.getNormalizedPathFromPathComponents(commonPathComponents);
}
function checkSourceFilesBelongToPath(sourceFiles, rootDirectory) {
var allFilesBelongToPath = true;
if (sourceFiles) {
var currentDirectory = host.getCurrentDirectory();
var absoluteRootDirectoryPath = host.getCanonicalFileName(ts.getNormalizedAbsolutePath(rootDirectory, currentDirectory));
for (var _i = 0; _i < sourceFiles.length; _i++) {
var sourceFile = sourceFiles[_i];
if (!ts.isDeclarationFile(sourceFile)) {
var absoluteSourceFilePath = host.getCanonicalFileName(ts.getNormalizedAbsolutePath(sourceFile.fileName, currentDirectory));
if (absoluteSourceFilePath.indexOf(absoluteRootDirectoryPath) !== 0) {
diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files, sourceFile.fileName, options.rootDir));
allFilesBelongToPath = false;
}
}
}
}
return allFilesBelongToPath;
}
function verifyCompilerOptions() {
if (options.separateCompilation) {
if (options.sourceMap) {
@ -24710,34 +24759,13 @@ var ts;
options.sourceRoot ||
(options.mapRoot &&
(!options.out || firstExternalModuleSourceFile !== undefined))) {
var commonPathComponents;
ts.forEach(files, function (sourceFile) {
if (!(sourceFile.flags & 2048)
&& !ts.fileExtensionIs(sourceFile.fileName, ".js")) {
var sourcePathComponents = ts.getNormalizedPathComponents(sourceFile.fileName, host.getCurrentDirectory());
sourcePathComponents.pop();
if (commonPathComponents) {
for (var i = 0; i < Math.min(commonPathComponents.length, sourcePathComponents.length); i++) {
if (commonPathComponents[i] !== sourcePathComponents[i]) {
if (i === 0) {
diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files));
return;
}
commonPathComponents.length = i;
break;
}
}
if (sourcePathComponents.length < commonPathComponents.length) {
commonPathComponents.length = sourcePathComponents.length;
}
}
else {
commonPathComponents = sourcePathComponents;
}
}
});
commonSourceDirectory = ts.getNormalizedPathFromPathComponents(commonPathComponents);
if (commonSourceDirectory) {
if (options.rootDir && checkSourceFilesBelongToPath(files, options.rootDir)) {
commonSourceDirectory = ts.getNormalizedAbsolutePath(options.rootDir, host.getCurrentDirectory());
}
else {
commonSourceDirectory = computeCommonSourceDirectory(files);
}
if (commonSourceDirectory && commonSourceDirectory[commonSourceDirectory.length - 1] !== ts.directorySeparator) {
commonSourceDirectory += ts.directorySeparator;
}
}
@ -24864,6 +24892,13 @@ var ts;
type: "boolean",
description: ts.Diagnostics.Do_not_emit_comments_to_output
},
{
name: "rootDir",
type: "string",
isFilePath: true,
description: ts.Diagnostics.Specifies_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir,
paramType: ts.Diagnostics.LOCATION
},
{
name: "separateCompilation",
type: "boolean"

View file

@ -1399,6 +1399,8 @@ var ts;
Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures: { code: 6055, category: ts.DiagnosticCategory.Message, key: "Suppress noImplicitAny errors for indexing objects lacking index signatures." },
Do_not_emit_declarations_for_code_that_has_an_internal_annotation: { code: 6056, category: ts.DiagnosticCategory.Message, key: "Do not emit declarations for code that has an '@internal' annotation." },
Preserve_new_lines_when_emitting_code: { code: 6057, category: ts.DiagnosticCategory.Message, key: "Preserve new-lines when emitting code." },
Specifies_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir: { code: 6058, category: ts.DiagnosticCategory.Message, key: "Specifies the root directory of input files. Use to control the output directory structure with --outDir." },
File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files: { code: 6059, category: ts.DiagnosticCategory.Error, key: "File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files." },
Variable_0_implicitly_has_an_1_type: { code: 7005, category: ts.DiagnosticCategory.Error, key: "Variable '{0}' implicitly has an '{1}' type." },
Parameter_0_implicitly_has_an_1_type: { code: 7006, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' implicitly has an '{1}' type." },
Member_0_implicitly_has_an_1_type: { code: 7008, category: ts.DiagnosticCategory.Error, key: "Member '{0}' implicitly has an '{1}' type." },
@ -2796,6 +2798,13 @@ var ts;
type: "boolean",
description: ts.Diagnostics.Do_not_emit_comments_to_output
},
{
name: "rootDir",
type: "string",
isFilePath: true,
description: ts.Diagnostics.Specifies_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir,
paramType: ts.Diagnostics.LOCATION
},
{
name: "separateCompilation",
type: "boolean"
@ -11896,7 +11905,7 @@ var ts;
return type;
}
function combineTypeMappers(mapper1, mapper2) {
return function (t) { return mapper2(mapper1(t)); };
return function (t) { return instantiateType(mapper1(t), mapper2); };
}
function instantiateTypeParameter(typeParameter, mapper) {
var result = createType(512);
@ -20499,8 +20508,8 @@ var ts;
ts.isExternalModuleOrDeclarationFile = isExternalModuleOrDeclarationFile;
function emitFiles(resolver, host, targetSourceFile) {
var extendsHelper = "\nvar __extends = this.__extends || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n __.prototype = b.prototype;\n d.prototype = new __();\n};";
var decorateHelper = "\nvar __decorate = this.__decorate || (typeof Reflect === \"object\" && Reflect.decorate) || function (decorators, target, key, desc) {\n switch (arguments.length) {\n case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);\n case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);\n case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc);\n }\n};";
var metadataHelper = "\nvar __metadata = this.__metadata || (typeof Reflect === \"object\" && Reflect.metadata) || function () { };";
var decorateHelper = "\nvar __decorate = this.__decorate || function (decorators, target, key, desc) {\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") return Reflect.decorate(decorators, target, key, desc);\n switch (arguments.length) {\n case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);\n case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);\n case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc);\n }\n};";
var metadataHelper = "\nvar __metadata = this.__metadata || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};";
var paramHelper = "\nvar __param = this.__param || function(index, decorator) { return function (target, key) { decorator(target, key, index); } };";
var compilerOptions = host.getCompilerOptions();
var languageVersion = compilerOptions.target || 0;
@ -24784,7 +24793,7 @@ var ts;
getDiagnosticsProducingTypeChecker: getDiagnosticsProducingTypeChecker,
getCommonSourceDirectory: function () { return commonSourceDirectory; },
emit: emit,
getCurrentDirectory: host.getCurrentDirectory,
getCurrentDirectory: function () { return host.getCurrentDirectory(); },
getNodeCount: function () { return getDiagnosticsProducingTypeChecker().getNodeCount(); },
getIdentifierCount: function () { return getDiagnosticsProducingTypeChecker().getIdentifierCount(); },
getSymbolCount: function () { return getDiagnosticsProducingTypeChecker().getSymbolCount(); },
@ -24793,14 +24802,14 @@ var ts;
return program;
function getEmitHost(writeFileCallback) {
return {
getCanonicalFileName: host.getCanonicalFileName,
getCanonicalFileName: function (fileName) { return host.getCanonicalFileName(fileName); },
getCommonSourceDirectory: program.getCommonSourceDirectory,
getCompilerOptions: program.getCompilerOptions,
getCurrentDirectory: host.getCurrentDirectory,
getNewLine: host.getNewLine,
getCurrentDirectory: function () { return host.getCurrentDirectory(); },
getNewLine: function () { return host.getNewLine(); },
getSourceFile: program.getSourceFile,
getSourceFiles: program.getSourceFiles,
writeFile: writeFileCallback || host.writeFile
writeFile: writeFileCallback || (function (fileName, data, writeByteOrderMark, onError) { return host.writeFile(fileName, data, writeByteOrderMark, onError); })
};
}
function getDiagnosticsProducingTypeChecker() {
@ -25006,6 +25015,53 @@ var ts;
return findSourceFile(fileName, false, file, nameLiteral.pos, nameLiteral.end - nameLiteral.pos);
}
}
function computeCommonSourceDirectory(sourceFiles) {
var commonPathComponents;
var currentDirectory = host.getCurrentDirectory();
ts.forEach(files, function (sourceFile) {
if (ts.isDeclarationFile(sourceFile)) {
return;
}
var sourcePathComponents = ts.getNormalizedPathComponents(sourceFile.fileName, currentDirectory);
sourcePathComponents.pop();
if (!commonPathComponents) {
commonPathComponents = sourcePathComponents;
return;
}
for (var i = 0, n = Math.min(commonPathComponents.length, sourcePathComponents.length); i < n; i++) {
if (commonPathComponents[i] !== sourcePathComponents[i]) {
if (i === 0) {
diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files));
return;
}
commonPathComponents.length = i;
break;
}
}
if (sourcePathComponents.length < commonPathComponents.length) {
commonPathComponents.length = sourcePathComponents.length;
}
});
return ts.getNormalizedPathFromPathComponents(commonPathComponents);
}
function checkSourceFilesBelongToPath(sourceFiles, rootDirectory) {
var allFilesBelongToPath = true;
if (sourceFiles) {
var currentDirectory = host.getCurrentDirectory();
var absoluteRootDirectoryPath = host.getCanonicalFileName(ts.getNormalizedAbsolutePath(rootDirectory, currentDirectory));
for (var _i = 0; _i < sourceFiles.length; _i++) {
var sourceFile = sourceFiles[_i];
if (!ts.isDeclarationFile(sourceFile)) {
var absoluteSourceFilePath = host.getCanonicalFileName(ts.getNormalizedAbsolutePath(sourceFile.fileName, currentDirectory));
if (absoluteSourceFilePath.indexOf(absoluteRootDirectoryPath) !== 0) {
diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files, sourceFile.fileName, options.rootDir));
allFilesBelongToPath = false;
}
}
}
}
return allFilesBelongToPath;
}
function verifyCompilerOptions() {
if (options.separateCompilation) {
if (options.sourceMap) {
@ -25053,34 +25109,13 @@ var ts;
options.sourceRoot ||
(options.mapRoot &&
(!options.out || firstExternalModuleSourceFile !== undefined))) {
var commonPathComponents;
ts.forEach(files, function (sourceFile) {
if (!(sourceFile.flags & 2048)
&& !ts.fileExtensionIs(sourceFile.fileName, ".js")) {
var sourcePathComponents = ts.getNormalizedPathComponents(sourceFile.fileName, host.getCurrentDirectory());
sourcePathComponents.pop();
if (commonPathComponents) {
for (var i = 0; i < Math.min(commonPathComponents.length, sourcePathComponents.length); i++) {
if (commonPathComponents[i] !== sourcePathComponents[i]) {
if (i === 0) {
diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files));
return;
}
commonPathComponents.length = i;
break;
}
}
if (sourcePathComponents.length < commonPathComponents.length) {
commonPathComponents.length = sourcePathComponents.length;
}
}
else {
commonPathComponents = sourcePathComponents;
}
}
});
commonSourceDirectory = ts.getNormalizedPathFromPathComponents(commonPathComponents);
if (commonSourceDirectory) {
if (options.rootDir && checkSourceFilesBelongToPath(files, options.rootDir)) {
commonSourceDirectory = ts.getNormalizedAbsolutePath(options.rootDir, host.getCurrentDirectory());
}
else {
commonSourceDirectory = computeCommonSourceDirectory(files);
}
if (commonSourceDirectory && commonSourceDirectory[commonSourceDirectory.length - 1] !== ts.directorySeparator) {
commonSourceDirectory += ts.directorySeparator;
}
}
@ -34835,6 +34870,9 @@ var ts;
if (lineText.charAt(i) == " ") {
indentPosition--;
}
else if (lineText.charAt(i) == "\t") {
indentPosition -= editorOptions.IndentSize;
}
else {
break;
}

1
bin/typescript.d.ts vendored
View file

@ -1095,6 +1095,7 @@ declare module "typescript" {
preserveConstEnums?: boolean;
project?: string;
removeComments?: boolean;
rootDir?: string;
sourceMap?: boolean;
sourceRoot?: string;
suppressImplicitAnyIndexErrors?: boolean;

View file

@ -2133,6 +2133,8 @@ var ts;
Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures: { code: 6055, category: ts.DiagnosticCategory.Message, key: "Suppress noImplicitAny errors for indexing objects lacking index signatures." },
Do_not_emit_declarations_for_code_that_has_an_internal_annotation: { code: 6056, category: ts.DiagnosticCategory.Message, key: "Do not emit declarations for code that has an '@internal' annotation." },
Preserve_new_lines_when_emitting_code: { code: 6057, category: ts.DiagnosticCategory.Message, key: "Preserve new-lines when emitting code." },
Specifies_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir: { code: 6058, category: ts.DiagnosticCategory.Message, key: "Specifies the root directory of input files. Use to control the output directory structure with --outDir." },
File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files: { code: 6059, category: ts.DiagnosticCategory.Error, key: "File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files." },
Variable_0_implicitly_has_an_1_type: { code: 7005, category: ts.DiagnosticCategory.Error, key: "Variable '{0}' implicitly has an '{1}' type." },
Parameter_0_implicitly_has_an_1_type: { code: 7006, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' implicitly has an '{1}' type." },
Member_0_implicitly_has_an_1_type: { code: 7008, category: ts.DiagnosticCategory.Error, key: "Member '{0}' implicitly has an '{1}' type." },
@ -14105,7 +14107,7 @@ var ts;
return type;
}
function combineTypeMappers(mapper1, mapper2) {
return function (t) { return mapper2(mapper1(t)); };
return function (t) { return instantiateType(mapper1(t), mapper2); };
}
function instantiateTypeParameter(typeParameter, mapper) {
var result = createType(512 /* TypeParameter */);
@ -24025,9 +24027,9 @@ var ts;
// emit output for the __extends helper function
var extendsHelper = "\nvar __extends = this.__extends || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n __.prototype = b.prototype;\n d.prototype = new __();\n};";
// emit output for the __decorate helper function
var decorateHelper = "\nvar __decorate = this.__decorate || (typeof Reflect === \"object\" && Reflect.decorate) || function (decorators, target, key, desc) {\n switch (arguments.length) {\n case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);\n case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);\n case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc);\n }\n};";
var decorateHelper = "\nvar __decorate = this.__decorate || function (decorators, target, key, desc) {\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") return Reflect.decorate(decorators, target, key, desc);\n switch (arguments.length) {\n case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);\n case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);\n case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc);\n }\n};";
// emit output for the __metadata helper function
var metadataHelper = "\nvar __metadata = this.__metadata || (typeof Reflect === \"object\" && Reflect.metadata) || function () { };";
var metadataHelper = "\nvar __metadata = this.__metadata || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};";
// emit output for the __param helper function
var paramHelper = "\nvar __param = this.__param || function(index, decorator) { return function (target, key) { decorator(target, key, index); } };";
var compilerOptions = host.getCompilerOptions();
@ -28855,7 +28857,7 @@ var ts;
getDiagnosticsProducingTypeChecker: getDiagnosticsProducingTypeChecker,
getCommonSourceDirectory: function () { return commonSourceDirectory; },
emit: emit,
getCurrentDirectory: host.getCurrentDirectory,
getCurrentDirectory: function () { return host.getCurrentDirectory(); },
getNodeCount: function () { return getDiagnosticsProducingTypeChecker().getNodeCount(); },
getIdentifierCount: function () { return getDiagnosticsProducingTypeChecker().getIdentifierCount(); },
getSymbolCount: function () { return getDiagnosticsProducingTypeChecker().getSymbolCount(); },
@ -28864,14 +28866,14 @@ var ts;
return program;
function getEmitHost(writeFileCallback) {
return {
getCanonicalFileName: host.getCanonicalFileName,
getCanonicalFileName: function (fileName) { return host.getCanonicalFileName(fileName); },
getCommonSourceDirectory: program.getCommonSourceDirectory,
getCompilerOptions: program.getCompilerOptions,
getCurrentDirectory: host.getCurrentDirectory,
getNewLine: host.getNewLine,
getCurrentDirectory: function () { return host.getCurrentDirectory(); },
getNewLine: function () { return host.getNewLine(); },
getSourceFile: program.getSourceFile,
getSourceFiles: program.getSourceFiles,
writeFile: writeFileCallback || host.writeFile
writeFile: writeFileCallback || (function (fileName, data, writeByteOrderMark, onError) { return host.writeFile(fileName, data, writeByteOrderMark, onError); })
};
}
function getDiagnosticsProducingTypeChecker() {
@ -29095,6 +29097,57 @@ var ts;
return findSourceFile(fileName, false, file, nameLiteral.pos, nameLiteral.end - nameLiteral.pos);
}
}
function computeCommonSourceDirectory(sourceFiles) {
var commonPathComponents;
var currentDirectory = host.getCurrentDirectory();
ts.forEach(files, function (sourceFile) {
// Each file contributes into common source file path
if (ts.isDeclarationFile(sourceFile)) {
return;
}
var sourcePathComponents = ts.getNormalizedPathComponents(sourceFile.fileName, currentDirectory);
sourcePathComponents.pop(); // The base file name is not part of the common directory path
if (!commonPathComponents) {
// first file
commonPathComponents = sourcePathComponents;
return;
}
for (var i = 0, n = Math.min(commonPathComponents.length, sourcePathComponents.length); i < n; i++) {
if (commonPathComponents[i] !== sourcePathComponents[i]) {
if (i === 0) {
diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files));
return;
}
// New common path found that is 0 -> i-1
commonPathComponents.length = i;
break;
}
}
// If the sourcePathComponents was shorter than the commonPathComponents, truncate to the sourcePathComponents
if (sourcePathComponents.length < commonPathComponents.length) {
commonPathComponents.length = sourcePathComponents.length;
}
});
return ts.getNormalizedPathFromPathComponents(commonPathComponents);
}
function checkSourceFilesBelongToPath(sourceFiles, rootDirectory) {
var allFilesBelongToPath = true;
if (sourceFiles) {
var currentDirectory = host.getCurrentDirectory();
var absoluteRootDirectoryPath = host.getCanonicalFileName(ts.getNormalizedAbsolutePath(rootDirectory, currentDirectory));
for (var _i = 0; _i < sourceFiles.length; _i++) {
var sourceFile = sourceFiles[_i];
if (!ts.isDeclarationFile(sourceFile)) {
var absoluteSourceFilePath = host.getCanonicalFileName(ts.getNormalizedAbsolutePath(sourceFile.fileName, currentDirectory));
if (absoluteSourceFilePath.indexOf(absoluteRootDirectoryPath) !== 0) {
diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files, sourceFile.fileName, options.rootDir));
allFilesBelongToPath = false;
}
}
}
}
return allFilesBelongToPath;
}
function verifyCompilerOptions() {
if (options.separateCompilation) {
if (options.sourceMap) {
@ -29147,38 +29200,15 @@ var ts;
options.sourceRoot ||
(options.mapRoot &&
(!options.out || firstExternalModuleSourceFile !== undefined))) {
var commonPathComponents;
ts.forEach(files, function (sourceFile) {
// Each file contributes into common source file path
if (!(sourceFile.flags & 2048 /* DeclarationFile */)
&& !ts.fileExtensionIs(sourceFile.fileName, ".js")) {
var sourcePathComponents = ts.getNormalizedPathComponents(sourceFile.fileName, host.getCurrentDirectory());
sourcePathComponents.pop(); // FileName is not part of directory
if (commonPathComponents) {
for (var i = 0; i < Math.min(commonPathComponents.length, sourcePathComponents.length); i++) {
if (commonPathComponents[i] !== sourcePathComponents[i]) {
if (i === 0) {
diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files));
return;
}
// New common path found that is 0 -> i-1
commonPathComponents.length = i;
break;
}
}
// If the fileComponent path completely matched and less than already found update the length
if (sourcePathComponents.length < commonPathComponents.length) {
commonPathComponents.length = sourcePathComponents.length;
}
}
else {
// first file
commonPathComponents = sourcePathComponents;
}
}
});
commonSourceDirectory = ts.getNormalizedPathFromPathComponents(commonPathComponents);
if (commonSourceDirectory) {
if (options.rootDir && checkSourceFilesBelongToPath(files, options.rootDir)) {
// If a rootDir is specified and is valid use it as the commonSourceDirectory
commonSourceDirectory = ts.getNormalizedAbsolutePath(options.rootDir, host.getCurrentDirectory());
}
else {
// Compute the commonSourceDirectory from the input files
commonSourceDirectory = computeCommonSourceDirectory(files);
}
if (commonSourceDirectory && commonSourceDirectory[commonSourceDirectory.length - 1] !== ts.directorySeparator) {
// Make sure directory path ends with directory separator so this string can directly
// used to replace with "" to get the relative path of the source file and the relative path doesn't
// start with / making it rooted path
@ -29309,6 +29339,13 @@ var ts;
type: "boolean",
description: ts.Diagnostics.Do_not_emit_comments_to_output
},
{
name: "rootDir",
type: "string",
isFilePath: true,
description: ts.Diagnostics.Specifies_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir,
paramType: ts.Diagnostics.LOCATION
},
{
name: "separateCompilation",
type: "boolean"

View file

@ -1095,6 +1095,7 @@ declare module ts {
preserveConstEnums?: boolean;
project?: string;
removeComments?: boolean;
rootDir?: string;
sourceMap?: boolean;
sourceRoot?: string;
suppressImplicitAnyIndexErrors?: boolean;

View file

@ -2133,6 +2133,8 @@ var ts;
Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures: { code: 6055, category: ts.DiagnosticCategory.Message, key: "Suppress noImplicitAny errors for indexing objects lacking index signatures." },
Do_not_emit_declarations_for_code_that_has_an_internal_annotation: { code: 6056, category: ts.DiagnosticCategory.Message, key: "Do not emit declarations for code that has an '@internal' annotation." },
Preserve_new_lines_when_emitting_code: { code: 6057, category: ts.DiagnosticCategory.Message, key: "Preserve new-lines when emitting code." },
Specifies_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir: { code: 6058, category: ts.DiagnosticCategory.Message, key: "Specifies the root directory of input files. Use to control the output directory structure with --outDir." },
File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files: { code: 6059, category: ts.DiagnosticCategory.Error, key: "File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files." },
Variable_0_implicitly_has_an_1_type: { code: 7005, category: ts.DiagnosticCategory.Error, key: "Variable '{0}' implicitly has an '{1}' type." },
Parameter_0_implicitly_has_an_1_type: { code: 7006, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' implicitly has an '{1}' type." },
Member_0_implicitly_has_an_1_type: { code: 7008, category: ts.DiagnosticCategory.Error, key: "Member '{0}' implicitly has an '{1}' type." },
@ -14105,7 +14107,7 @@ var ts;
return type;
}
function combineTypeMappers(mapper1, mapper2) {
return function (t) { return mapper2(mapper1(t)); };
return function (t) { return instantiateType(mapper1(t), mapper2); };
}
function instantiateTypeParameter(typeParameter, mapper) {
var result = createType(512 /* TypeParameter */);
@ -24025,9 +24027,9 @@ var ts;
// emit output for the __extends helper function
var extendsHelper = "\nvar __extends = this.__extends || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n __.prototype = b.prototype;\n d.prototype = new __();\n};";
// emit output for the __decorate helper function
var decorateHelper = "\nvar __decorate = this.__decorate || (typeof Reflect === \"object\" && Reflect.decorate) || function (decorators, target, key, desc) {\n switch (arguments.length) {\n case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);\n case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);\n case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc);\n }\n};";
var decorateHelper = "\nvar __decorate = this.__decorate || function (decorators, target, key, desc) {\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") return Reflect.decorate(decorators, target, key, desc);\n switch (arguments.length) {\n case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);\n case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);\n case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc);\n }\n};";
// emit output for the __metadata helper function
var metadataHelper = "\nvar __metadata = this.__metadata || (typeof Reflect === \"object\" && Reflect.metadata) || function () { };";
var metadataHelper = "\nvar __metadata = this.__metadata || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};";
// emit output for the __param helper function
var paramHelper = "\nvar __param = this.__param || function(index, decorator) { return function (target, key) { decorator(target, key, index); } };";
var compilerOptions = host.getCompilerOptions();
@ -28855,7 +28857,7 @@ var ts;
getDiagnosticsProducingTypeChecker: getDiagnosticsProducingTypeChecker,
getCommonSourceDirectory: function () { return commonSourceDirectory; },
emit: emit,
getCurrentDirectory: host.getCurrentDirectory,
getCurrentDirectory: function () { return host.getCurrentDirectory(); },
getNodeCount: function () { return getDiagnosticsProducingTypeChecker().getNodeCount(); },
getIdentifierCount: function () { return getDiagnosticsProducingTypeChecker().getIdentifierCount(); },
getSymbolCount: function () { return getDiagnosticsProducingTypeChecker().getSymbolCount(); },
@ -28864,14 +28866,14 @@ var ts;
return program;
function getEmitHost(writeFileCallback) {
return {
getCanonicalFileName: host.getCanonicalFileName,
getCanonicalFileName: function (fileName) { return host.getCanonicalFileName(fileName); },
getCommonSourceDirectory: program.getCommonSourceDirectory,
getCompilerOptions: program.getCompilerOptions,
getCurrentDirectory: host.getCurrentDirectory,
getNewLine: host.getNewLine,
getCurrentDirectory: function () { return host.getCurrentDirectory(); },
getNewLine: function () { return host.getNewLine(); },
getSourceFile: program.getSourceFile,
getSourceFiles: program.getSourceFiles,
writeFile: writeFileCallback || host.writeFile
writeFile: writeFileCallback || (function (fileName, data, writeByteOrderMark, onError) { return host.writeFile(fileName, data, writeByteOrderMark, onError); })
};
}
function getDiagnosticsProducingTypeChecker() {
@ -29095,6 +29097,57 @@ var ts;
return findSourceFile(fileName, false, file, nameLiteral.pos, nameLiteral.end - nameLiteral.pos);
}
}
function computeCommonSourceDirectory(sourceFiles) {
var commonPathComponents;
var currentDirectory = host.getCurrentDirectory();
ts.forEach(files, function (sourceFile) {
// Each file contributes into common source file path
if (ts.isDeclarationFile(sourceFile)) {
return;
}
var sourcePathComponents = ts.getNormalizedPathComponents(sourceFile.fileName, currentDirectory);
sourcePathComponents.pop(); // The base file name is not part of the common directory path
if (!commonPathComponents) {
// first file
commonPathComponents = sourcePathComponents;
return;
}
for (var i = 0, n = Math.min(commonPathComponents.length, sourcePathComponents.length); i < n; i++) {
if (commonPathComponents[i] !== sourcePathComponents[i]) {
if (i === 0) {
diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files));
return;
}
// New common path found that is 0 -> i-1
commonPathComponents.length = i;
break;
}
}
// If the sourcePathComponents was shorter than the commonPathComponents, truncate to the sourcePathComponents
if (sourcePathComponents.length < commonPathComponents.length) {
commonPathComponents.length = sourcePathComponents.length;
}
});
return ts.getNormalizedPathFromPathComponents(commonPathComponents);
}
function checkSourceFilesBelongToPath(sourceFiles, rootDirectory) {
var allFilesBelongToPath = true;
if (sourceFiles) {
var currentDirectory = host.getCurrentDirectory();
var absoluteRootDirectoryPath = host.getCanonicalFileName(ts.getNormalizedAbsolutePath(rootDirectory, currentDirectory));
for (var _i = 0; _i < sourceFiles.length; _i++) {
var sourceFile = sourceFiles[_i];
if (!ts.isDeclarationFile(sourceFile)) {
var absoluteSourceFilePath = host.getCanonicalFileName(ts.getNormalizedAbsolutePath(sourceFile.fileName, currentDirectory));
if (absoluteSourceFilePath.indexOf(absoluteRootDirectoryPath) !== 0) {
diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files, sourceFile.fileName, options.rootDir));
allFilesBelongToPath = false;
}
}
}
}
return allFilesBelongToPath;
}
function verifyCompilerOptions() {
if (options.separateCompilation) {
if (options.sourceMap) {
@ -29147,38 +29200,15 @@ var ts;
options.sourceRoot ||
(options.mapRoot &&
(!options.out || firstExternalModuleSourceFile !== undefined))) {
var commonPathComponents;
ts.forEach(files, function (sourceFile) {
// Each file contributes into common source file path
if (!(sourceFile.flags & 2048 /* DeclarationFile */)
&& !ts.fileExtensionIs(sourceFile.fileName, ".js")) {
var sourcePathComponents = ts.getNormalizedPathComponents(sourceFile.fileName, host.getCurrentDirectory());
sourcePathComponents.pop(); // FileName is not part of directory
if (commonPathComponents) {
for (var i = 0; i < Math.min(commonPathComponents.length, sourcePathComponents.length); i++) {
if (commonPathComponents[i] !== sourcePathComponents[i]) {
if (i === 0) {
diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files));
return;
}
// New common path found that is 0 -> i-1
commonPathComponents.length = i;
break;
}
}
// If the fileComponent path completely matched and less than already found update the length
if (sourcePathComponents.length < commonPathComponents.length) {
commonPathComponents.length = sourcePathComponents.length;
}
}
else {
// first file
commonPathComponents = sourcePathComponents;
}
}
});
commonSourceDirectory = ts.getNormalizedPathFromPathComponents(commonPathComponents);
if (commonSourceDirectory) {
if (options.rootDir && checkSourceFilesBelongToPath(files, options.rootDir)) {
// If a rootDir is specified and is valid use it as the commonSourceDirectory
commonSourceDirectory = ts.getNormalizedAbsolutePath(options.rootDir, host.getCurrentDirectory());
}
else {
// Compute the commonSourceDirectory from the input files
commonSourceDirectory = computeCommonSourceDirectory(files);
}
if (commonSourceDirectory && commonSourceDirectory[commonSourceDirectory.length - 1] !== ts.directorySeparator) {
// Make sure directory path ends with directory separator so this string can directly
// used to replace with "" to get the relative path of the source file and the relative path doesn't
// start with / making it rooted path
@ -29309,6 +29339,13 @@ var ts;
type: "boolean",
description: ts.Diagnostics.Do_not_emit_comments_to_output
},
{
name: "rootDir",
type: "string",
isFilePath: true,
description: ts.Diagnostics.Specifies_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir,
paramType: ts.Diagnostics.LOCATION
},
{
name: "separateCompilation",
type: "boolean"

15
doc/logo.svg Normal file
View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" id="logo-typescript" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 283.09 69.57">
<g fill="#007ACC">
<path d="M34.98 7.56H20.43v45.07h-5.91V7.56H0V2.21h34.98V7.56z"/>
<path d="M57.94 16.63L41.38 58.39c-2.95 7.45-7.1 11.18-12.45 11.18 -1.5 0-2.75-0.15-3.76-0.46v-5.17c1.24 0.42 2.38 0.63 3.41 0.63 2.91 0 5.09-1.73 6.54-5.2l2.88-6.82L23.94 16.63h6.4l9.74 27.7c0.12 0.35 0.36 1.27 0.74 2.74h0.21c0.12-0.56 0.35-1.45 0.7-2.67l10.23-27.77H57.94z"/>
<path d="M67.37 47.43h-0.14v21.76h-5.77V16.63h5.77v6.33h0.14c2.84-4.78 6.98-7.17 12.45-7.17 4.64 0 8.26 1.61 10.86 4.83 2.6 3.22 3.9 7.54 3.9 12.96 0 6.02-1.46 10.85-4.39 14.47 -2.93 3.62-6.94 5.43-12.02 5.43C73.5 53.47 69.9 51.46 67.37 47.43zM67.23 32.91v5.03c0 2.98 0.97 5.5 2.9 7.58s4.39 3.11 7.37 3.11c3.49 0 6.23-1.34 8.21-4.01 1.98-2.67 2.97-6.39 2.97-11.14 0-4.01-0.93-7.15-2.78-9.42 -1.85-2.27-4.36-3.41-7.52-3.41 -3.35 0-6.05 1.17-8.09 3.5C68.25 26.47 67.23 29.39 67.23 32.91z"/>
<path d="M129.56 36.07h-25.42c0.09 4.01 1.17 7.1 3.23 9.28 2.06 2.18 4.9 3.27 8.51 3.27 4.05 0 7.78-1.34 11.18-4.01v5.41c-3.16 2.3-7.35 3.45-12.55 3.45 -5.09 0-9.08-1.63-11.99-4.9 -2.91-3.27-4.36-7.87-4.36-13.8 0-5.6 1.59-10.17 4.76-13.69 3.18-3.53 7.12-5.29 11.83-5.29s8.35 1.52 10.93 4.57c2.58 3.05 3.87 7.28 3.87 12.69V36.07zM123.65 31.18c-0.02-3.33-0.83-5.92-2.41-7.77 -1.58-1.85-3.78-2.78-6.59-2.78 -2.72 0-5.03 0.97-6.93 2.92 -1.9 1.95-3.07 4.49-3.52 7.63H123.65z"/>
<path d="M134.6 50.59v-6.96c0.73 0.7 1.6 1.34 2.62 1.9 1.02 0.56 2.09 1.04 3.22 1.42s2.26 0.69 3.39 0.9c1.14 0.21 2.19 0.32 3.15 0.32 3.32 0 5.81-0.67 7.45-2.02 1.64-1.35 2.46-3.29 2.46-5.82 0-1.36-0.27-2.54-0.82-3.55 -0.55-1.01-1.3-1.93-2.27-2.76s-2.11-1.63-3.43-2.39c-1.32-0.76-2.74-1.56-4.26-2.41 -1.61-0.89-3.11-1.79-4.5-2.71 -1.39-0.91-2.61-1.92-3.63-3.02 -1.03-1.1-1.84-2.35-2.43-3.74 -0.59-1.39-0.88-3.03-0.88-4.9 0-2.3 0.46-4.29 1.38-5.99 0.92-1.7 2.13-3.1 3.64-4.2 1.5-1.1 3.21-1.92 5.13-2.46 1.92-0.54 3.88-0.81 5.87-0.81 4.55 0 7.86 0.6 9.94 1.79v6.64c-2.72-2.06-6.22-3.09-10.49-3.09 -1.18 0-2.36 0.14-3.54 0.4 -1.18 0.27-2.23 0.71-3.15 1.32 -0.92 0.61-1.67 1.39-2.25 2.36 -0.58 0.96-0.87 2.13-0.87 3.52 0 1.29 0.22 2.4 0.66 3.34 0.44 0.94 1.09 1.79 1.95 2.57 0.86 0.77 1.9 1.52 3.14 2.25 1.23 0.73 2.65 1.52 4.26 2.39 1.65 0.89 3.22 1.83 4.7 2.81s2.78 2.07 3.89 3.27c1.11 1.2 2 2.52 2.65 3.97 0.65 1.45 0.98 3.12 0.98 4.99 0 2.48-0.45 4.59-1.33 6.31 -0.89 1.72-2.09 3.12-3.6 4.2 -1.51 1.08-3.25 1.86-5.23 2.34 -1.97 0.48-4.05 0.72-6.24 0.72 -0.73 0-1.63-0.06-2.7-0.19s-2.17-0.32-3.28-0.56c-1.12-0.25-2.17-0.55-3.17-0.91C136 51.44 135.21 51.03 134.6 50.59z"/>
<path d="M193.25 50.98c-2.77 1.66-6.05 2.5-9.84 2.5 -5.13 0-9.28-1.67-12.43-5.01s-4.73-7.67-4.73-12.99c0-5.93 1.7-10.69 5.1-14.29 3.4-3.6 7.93-5.4 13.61-5.4 3.16 0 5.95 0.59 8.37 1.76v5.91c-2.67-1.88-5.53-2.81-8.58-2.81 -3.68 0-6.7 1.32-9.05 3.96s-3.53 6.1-3.53 10.39c0 4.22 1.11 7.55 3.32 9.98s5.19 3.66 8.91 3.66c3.14 0 6.09-1.04 8.86-3.13V50.98z"/>
<path d="M215.56 22.46c-1.01-0.77-2.46-1.16-4.36-1.16 -2.46 0-4.52 1.16-6.17 3.48s-2.48 5.48-2.48 9.49v18.35h-5.77v-36h5.77v7.42h0.14c0.82-2.53 2.07-4.51 3.76-5.92 1.69-1.42 3.57-2.13 5.66-2.13 1.5 0 2.65 0.16 3.45 0.49V22.46z"/>
<path d="M222.18 7.49c-1.03 0-1.91-0.35-2.64-1.05s-1.09-1.59-1.09-2.67c0-1.08 0.36-1.97 1.09-2.69 0.73-0.71 1.61-1.07 2.64-1.07 1.05 0 1.95 0.36 2.69 1.07 0.74 0.72 1.11 1.61 1.11 2.69 0 1.03-0.37 1.91-1.11 2.64C224.13 7.12 223.23 7.49 222.18 7.49zM224.99 52.63h-5.77v-36h5.77V52.63z"/>
<path d="M234.29 47.43h-0.14v21.76h-5.77V16.63h5.77v6.33h0.14c2.84-4.78 6.98-7.17 12.45-7.17 4.64 0 8.26 1.61 10.86 4.83 2.6 3.22 3.9 7.54 3.9 12.96 0 6.02-1.46 10.85-4.39 14.47s-6.94 5.43-12.02 5.43C240.42 53.47 236.82 51.46 234.29 47.43zM234.15 32.91v5.03c0 2.98 0.97 5.5 2.9 7.58s4.39 3.11 7.37 3.11c3.49 0 6.23-1.34 8.21-4.01s2.97-6.39 2.97-11.14c0-4.01-0.93-7.15-2.78-9.42 -1.85-2.27-4.36-3.41-7.52-3.41 -3.35 0-6.05 1.17-8.09 3.5C235.17 26.47 234.15 29.39 234.15 32.91z"/>
<path d="M283.09 52.28c-1.36 0.75-3.15 1.12-5.38 1.12 -6.3 0-9.46-3.52-9.46-10.55v-21.3h-6.19v-4.92h6.19V7.84l5.77-1.86v10.65h9.07v4.92h-9.07v20.28c0 2.41 0.41 4.14 1.23 5.17s2.18 1.55 4.08 1.55c1.45 0 2.71-0.4 3.76-1.2V52.28z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.2 KiB

View file

@ -239,11 +239,7 @@ module ts {
if (symbolKind & SymbolFlags.IsContainer) {
container = node;
if (lastContainer) {
lastContainer.nextContainer = container;
}
lastContainer = container;
addToContainerChain(container);
}
if (isBlockScopeContainer) {
@ -262,6 +258,14 @@ module ts {
blockScopeContainer = savedBlockScopeContainer;
}
function addToContainerChain(node: Node) {
if (lastContainer) {
lastContainer.nextContainer = node;
}
lastContainer = node;
}
function bindDeclaration(node: Declaration, symbolKind: SymbolFlags, symbolExcludes: SymbolFlags, isBlockScopeContainer: boolean) {
switch (container.kind) {
case SyntaxKind.ModuleDeclaration:
@ -403,6 +407,7 @@ module ts {
default:
if (!blockScopeContainer.locals) {
blockScopeContainer.locals = {};
addToContainerChain(blockScopeContainer);
}
declareSymbol(blockScopeContainer.locals, undefined, node, symbolKind, symbolExcludes);
}

View file

@ -110,6 +110,13 @@ module ts {
type: "boolean",
description: Diagnostics.Do_not_emit_comments_to_output,
},
{
name: "rootDir",
type: "string",
isFilePath: true,
description: Diagnostics.Specifies_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir,
paramType: Diagnostics.LOCATION,
},
{
name: "separateCompilation",
type: "boolean",

View file

@ -496,6 +496,8 @@ module ts {
Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures: { code: 6055, category: DiagnosticCategory.Message, key: "Suppress noImplicitAny errors for indexing objects lacking index signatures." },
Do_not_emit_declarations_for_code_that_has_an_internal_annotation: { code: 6056, category: DiagnosticCategory.Message, key: "Do not emit declarations for code that has an '@internal' annotation." },
Preserve_new_lines_when_emitting_code: { code: 6057, category: DiagnosticCategory.Message, key: "Preserve new-lines when emitting code." },
Specifies_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir: { code: 6058, category: DiagnosticCategory.Message, key: "Specifies the root directory of input files. Use to control the output directory structure with --outDir." },
File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files: { code: 6059, category: DiagnosticCategory.Error, key: "File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files." },
Variable_0_implicitly_has_an_1_type: { code: 7005, category: DiagnosticCategory.Error, key: "Variable '{0}' implicitly has an '{1}' type." },
Parameter_0_implicitly_has_an_1_type: { code: 7006, category: DiagnosticCategory.Error, key: "Parameter '{0}' implicitly has an '{1}' type." },
Member_0_implicitly_has_an_1_type: { code: 7008, category: DiagnosticCategory.Error, key: "Member '{0}' implicitly has an '{1}' type." },

View file

@ -1972,6 +1972,15 @@
"category": "Message",
"code": 6057
},
"Specifies the root directory of input files. Use to control the output directory structure with --outDir.": {
"category": "Message",
"code": 6058
},
"File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files.": {
"category": "Error",
"code": 6059
},
"Variable '{0}' implicitly has an '{1}' type.": {
"category": "Error",

View file

@ -34,7 +34,8 @@ var __extends = this.__extends || function (d, b) {
// emit output for the __decorate helper function
const decorateHelper = `
var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) {
var __decorate = this.__decorate || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);
@ -44,7 +45,9 @@ var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.deco
// emit output for the __metadata helper function
const metadataHelper = `
var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { };`;
var __metadata = this.__metadata || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};`;
// emit output for the __param helper function
const paramHelper = `

View file

@ -455,6 +455,66 @@ module ts {
}
}
function computeCommonSourceDirectory(sourceFiles: SourceFile[]): string {
let commonPathComponents: string[];
let currentDirectory = host.getCurrentDirectory();
forEach(files, sourceFile => {
// Each file contributes into common source file path
if (isDeclarationFile(sourceFile)) {
return;
}
let sourcePathComponents = getNormalizedPathComponents(sourceFile.fileName, currentDirectory);
sourcePathComponents.pop(); // The base file name is not part of the common directory path
if (!commonPathComponents) {
// first file
commonPathComponents = sourcePathComponents;
return;
}
for (let i = 0, n = Math.min(commonPathComponents.length, sourcePathComponents.length); i < n; i++) {
if (commonPathComponents[i] !== sourcePathComponents[i]) {
if (i === 0) {
diagnostics.add(createCompilerDiagnostic(Diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files));
return;
}
// New common path found that is 0 -> i-1
commonPathComponents.length = i;
break;
}
}
// If the sourcePathComponents was shorter than the commonPathComponents, truncate to the sourcePathComponents
if (sourcePathComponents.length < commonPathComponents.length) {
commonPathComponents.length = sourcePathComponents.length;
}
});
return getNormalizedPathFromPathComponents(commonPathComponents);
}
function checkSourceFilesBelongToPath(sourceFiles: SourceFile[], rootDirectory: string): boolean {
let allFilesBelongToPath = true;
if (sourceFiles) {
let currentDirectory = host.getCurrentDirectory();
let absoluteRootDirectoryPath = host.getCanonicalFileName(getNormalizedAbsolutePath(rootDirectory, currentDirectory));
for (var sourceFile of sourceFiles) {
if (!isDeclarationFile(sourceFile)) {
let absoluteSourceFilePath = host.getCanonicalFileName(getNormalizedAbsolutePath(sourceFile.fileName, currentDirectory));
if (absoluteSourceFilePath.indexOf(absoluteRootDirectoryPath) !== 0) {
diagnostics.add(createCompilerDiagnostic(Diagnostics.File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files, sourceFile.fileName, options.rootDir));
allFilesBelongToPath = false;
}
}
}
}
return allFilesBelongToPath;
}
function verifyCompilerOptions() {
if (options.separateCompilation) {
if (options.sourceMap) {
@ -517,41 +577,16 @@ module ts {
(options.mapRoot && // there is --mapRoot specified and there would be multiple js files generated
(!options.out || firstExternalModuleSourceFile !== undefined))) {
let commonPathComponents: string[];
forEach(files, sourceFile => {
// Each file contributes into common source file path
if (!(sourceFile.flags & NodeFlags.DeclarationFile)
&& !fileExtensionIs(sourceFile.fileName, ".js")) {
let sourcePathComponents = getNormalizedPathComponents(sourceFile.fileName, host.getCurrentDirectory());
sourcePathComponents.pop(); // FileName is not part of directory
if (commonPathComponents) {
for (let i = 0; i < Math.min(commonPathComponents.length, sourcePathComponents.length); i++) {
if (commonPathComponents[i] !== sourcePathComponents[i]) {
if (i === 0) {
diagnostics.add(createCompilerDiagnostic(Diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files));
return;
}
if (options.rootDir && checkSourceFilesBelongToPath(files, options.rootDir)) {
// If a rootDir is specified and is valid use it as the commonSourceDirectory
commonSourceDirectory = getNormalizedAbsolutePath(options.rootDir, host.getCurrentDirectory());
}
else {
// Compute the commonSourceDirectory from the input files
commonSourceDirectory = computeCommonSourceDirectory(files);
}
// New common path found that is 0 -> i-1
commonPathComponents.length = i;
break;
}
}
// If the fileComponent path completely matched and less than already found update the length
if (sourcePathComponents.length < commonPathComponents.length) {
commonPathComponents.length = sourcePathComponents.length;
}
}
else {
// first file
commonPathComponents = sourcePathComponents;
}
}
});
commonSourceDirectory = getNormalizedPathFromPathComponents(commonPathComponents);
if (commonSourceDirectory) {
if (commonSourceDirectory && commonSourceDirectory[commonSourceDirectory.length - 1] !== directorySeparator) {
// Make sure directory path ends with directory separator so this string can directly
// used to replace with "" to get the relative path of the source file and the relative path doesn't
// start with / making it rooted path

View file

@ -352,7 +352,7 @@ module ts {
export function isLineBreak(ch: number): boolean {
// ES5 7.3:
// The ECMAScript line terminator characters are listed in Table 3.
// Table 3 Line Terminator Characters
// Table 3: Line Terminator Characters
// Code Unit Value Name Formal Name
// \u000A Line Feed <LF>
// \u000D Carriage Return <CR>

View file

@ -1658,6 +1658,7 @@ module ts {
preserveConstEnums?: boolean;
project?: string;
removeComments?: boolean;
rootDir?: string;
sourceMap?: boolean;
sourceRoot?: string;
suppressImplicitAnyIndexErrors?: boolean;

View file

@ -97,7 +97,7 @@ class CompilerBaselineRunner extends RunnerBase {
program = _program;
}, function (settings) {
harnessCompiler.setCompilerSettings(tcSettings);
});
});
});
beforeEach(() => {
@ -252,7 +252,7 @@ class CompilerBaselineRunner extends RunnerBase {
}
});
it('Correct type baselines for ' + fileName, () => {
it('Correct type/symbol baselines for ' + fileName, () => {
if (fileName.indexOf("APISample") >= 0) {
return;
}
@ -289,8 +289,26 @@ class CompilerBaselineRunner extends RunnerBase {
// Produce baselines. The first gives the types for all expressions.
// The second gives symbols for all identifiers.
checkBaseLines(/*isSymbolBaseLine:*/ false);
checkBaseLines(/*isSymbolBaseLine:*/ true);
var e1: Error, e2: Error;
try {
checkBaseLines(/*isSymbolBaseLine:*/ false);
}
catch (e) {
e1 = e;
}
try {
checkBaseLines(/*isSymbolBaseLine:*/ true);
}
catch (e) {
e2 = e;
}
if (e1 || e2) {
throw e1 || e2;
}
return;
function checkBaseLines(isSymbolBaseLine: boolean) {
let fullBaseLine = generateBaseLine(fullResults, isSymbolBaseLine);

View file

@ -18,6 +18,7 @@ interface ProjectRunnerTestCase {
runTest?: boolean; // Run the resulting test
bug?: string; // If there is any bug associated with this test case
noResolve?: boolean;
rootDir?: string; // --rootDir
}
interface ProjectRunnerTestCaseResolutionInfo extends ProjectRunnerTestCase {
@ -160,7 +161,8 @@ class ProjectRunner extends RunnerBase {
mapRoot: testCase.resolveMapRoot && testCase.mapRoot ? ts.sys.resolvePath(testCase.mapRoot) : testCase.mapRoot,
sourceRoot: testCase.resolveSourceRoot && testCase.sourceRoot ? ts.sys.resolvePath(testCase.sourceRoot) : testCase.sourceRoot,
module: moduleKind,
noResolve: testCase.noResolve
noResolve: testCase.noResolve,
rootDir: testCase.rootDir
};
}
@ -344,6 +346,7 @@ class ProjectRunner extends RunnerBase {
baselineCheck: testCase.baselineCheck,
runTest: testCase.runTest,
bug: testCase.bug,
rootDir: testCase.rootDir,
resolvedInputFiles: ts.map(compilerResult.program.getSourceFiles(), inputFile => inputFile.fileName),
emittedFiles: ts.map(compilerResult.outputFiles, outputFile => outputFile.emittedFileName)
};

View file

@ -2,7 +2,8 @@
var v = @decorate class C { static p = 1 };
//// [classExpressionWithDecorator1.js]
var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) {
var __decorate = this.__decorate || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);

View file

@ -10,7 +10,8 @@ export default class Decorated { }
import Decorated from 'decorated';
//// [decorated.js]
var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) {
var __decorate = this.__decorate || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);

View file

@ -6,7 +6,8 @@ class C {
}
//// [decoratorOnClass1.js]
var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) {
var __decorate = this.__decorate || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);

View file

@ -6,7 +6,8 @@ export class C {
}
//// [decoratorOnClass2.js]
var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) {
var __decorate = this.__decorate || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);

View file

@ -7,7 +7,8 @@ class C {
}
//// [decoratorOnClass3.js]
var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) {
var __decorate = this.__decorate || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);

View file

@ -6,7 +6,8 @@ class C {
}
//// [decoratorOnClass4.js]
var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) {
var __decorate = this.__decorate || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);

View file

@ -6,7 +6,8 @@ class C {
}
//// [decoratorOnClass5.js]
var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) {
var __decorate = this.__decorate || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);

View file

@ -6,7 +6,8 @@ class C {
}
//// [decoratorOnClass8.js]
var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) {
var __decorate = this.__decorate || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);

View file

@ -6,7 +6,8 @@ class C {
}
//// [decoratorOnClassAccessor1.js]
var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) {
var __decorate = this.__decorate || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);

View file

@ -6,7 +6,8 @@ class C {
}
//// [decoratorOnClassAccessor2.js]
var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) {
var __decorate = this.__decorate || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);

View file

@ -6,7 +6,8 @@ class C {
}
//// [decoratorOnClassAccessor3.js]
var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) {
var __decorate = this.__decorate || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);

View file

@ -6,7 +6,8 @@ class C {
}
//// [decoratorOnClassAccessor4.js]
var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) {
var __decorate = this.__decorate || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);

View file

@ -6,7 +6,8 @@ class C {
}
//// [decoratorOnClassAccessor5.js]
var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) {
var __decorate = this.__decorate || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);

View file

@ -6,7 +6,8 @@ class C {
}
//// [decoratorOnClassAccessor6.js]
var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) {
var __decorate = this.__decorate || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);

View file

@ -6,7 +6,8 @@ class C {
}
//// [decoratorOnClassConstructorParameter1.js]
var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) {
var __decorate = this.__decorate || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);

View file

@ -6,7 +6,8 @@ class C {
}
//// [decoratorOnClassConstructorParameter4.js]
var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) {
var __decorate = this.__decorate || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);

View file

@ -6,7 +6,8 @@ class C {
}
//// [decoratorOnClassMethod1.js]
var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) {
var __decorate = this.__decorate || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);

View file

@ -6,7 +6,8 @@ class C {
}
//// [decoratorOnClassMethod10.js]
var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) {
var __decorate = this.__decorate || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);

View file

@ -9,7 +9,8 @@ module M {
}
//// [decoratorOnClassMethod11.js]
var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) {
var __decorate = this.__decorate || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);

View file

@ -16,7 +16,8 @@ var __extends = this.__extends || function (d, b) {
__.prototype = b.prototype;
d.prototype = new __();
};
var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) {
var __decorate = this.__decorate || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);

View file

@ -7,7 +7,8 @@ class C {
}
//// [decoratorOnClassMethod13.js]
var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) {
var __decorate = this.__decorate || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);

View file

@ -6,7 +6,8 @@ class C {
}
//// [decoratorOnClassMethod2.js]
var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) {
var __decorate = this.__decorate || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);

View file

@ -6,7 +6,8 @@ class C {
}
//// [decoratorOnClassMethod3.js]
var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) {
var __decorate = this.__decorate || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);

View file

@ -6,7 +6,8 @@ class C {
}
//// [decoratorOnClassMethod4.js]
var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) {
var __decorate = this.__decorate || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);

View file

@ -6,7 +6,8 @@ class C {
}
//// [decoratorOnClassMethod5.js]
var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) {
var __decorate = this.__decorate || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);

View file

@ -6,7 +6,8 @@ class C {
}
//// [decoratorOnClassMethod6.js]
var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) {
var __decorate = this.__decorate || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);

View file

@ -6,7 +6,8 @@ class C {
}
//// [decoratorOnClassMethod7.js]
var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) {
var __decorate = this.__decorate || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);

View file

@ -6,7 +6,8 @@ class C {
}
//// [decoratorOnClassMethod8.js]
var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) {
var __decorate = this.__decorate || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);

View file

@ -6,7 +6,8 @@ class C {
}
//// [decoratorOnClassMethodParameter1.js]
var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) {
var __decorate = this.__decorate || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);

View file

@ -6,7 +6,8 @@ class C {
}
//// [decoratorOnClassProperty1.js]
var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) {
var __decorate = this.__decorate || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);

View file

@ -6,7 +6,8 @@ class C {
}
//// [decoratorOnClassProperty10.js]
var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) {
var __decorate = this.__decorate || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);

View file

@ -6,7 +6,8 @@ class C {
}
//// [decoratorOnClassProperty11.js]
var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) {
var __decorate = this.__decorate || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);

View file

@ -6,7 +6,8 @@ class C {
}
//// [decoratorOnClassProperty2.js]
var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) {
var __decorate = this.__decorate || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);

View file

@ -6,7 +6,8 @@ class C {
}
//// [decoratorOnClassProperty3.js]
var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) {
var __decorate = this.__decorate || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);

View file

@ -6,7 +6,8 @@ class C {
}
//// [decoratorOnClassProperty6.js]
var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) {
var __decorate = this.__decorate || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);

View file

@ -6,7 +6,8 @@ class C {
}
//// [decoratorOnClassProperty7.js]
var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) {
var __decorate = this.__decorate || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);

View file

@ -0,0 +1,25 @@
//// [nameCollisionWithBlockScopedVariable1.ts]
module M {
export class C { }
}
module M {
{
let M = 0;
new C();
}
}
//// [nameCollisionWithBlockScopedVariable1.js]
var M;
(function (M) {
class C {
}
M.C = C;
})(M || (M = {}));
var M;
(function (M_1) {
{
let M = 0;
new M_1.C();
}
})(M || (M = {}));

View file

@ -0,0 +1,17 @@
=== tests/cases/compiler/nameCollisionWithBlockScopedVariable1.ts ===
module M {
>M : Symbol(M, Decl(nameCollisionWithBlockScopedVariable1.ts, 0, 0), Decl(nameCollisionWithBlockScopedVariable1.ts, 2, 1))
export class C { }
>C : Symbol(C, Decl(nameCollisionWithBlockScopedVariable1.ts, 0, 10))
}
module M {
>M : Symbol(M, Decl(nameCollisionWithBlockScopedVariable1.ts, 0, 0), Decl(nameCollisionWithBlockScopedVariable1.ts, 2, 1))
{
let M = 0;
>M : Symbol(M, Decl(nameCollisionWithBlockScopedVariable1.ts, 5, 11))
new C();
>C : Symbol(C, Decl(nameCollisionWithBlockScopedVariable1.ts, 0, 10))
}
}

View file

@ -0,0 +1,19 @@
=== tests/cases/compiler/nameCollisionWithBlockScopedVariable1.ts ===
module M {
>M : typeof M
export class C { }
>C : C
}
module M {
>M : typeof M
{
let M = 0;
>M : number
>0 : number
new C();
>new C() : C
>C : typeof C
}
}

View file

@ -0,0 +1,2 @@
declare class C {
}

View file

@ -0,0 +1,6 @@
var C = (function () {
function C() {
}
return C;
})();
//# sourceMappingURL=fileC.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"fileC.js","sourceRoot":"","sources":["../../../../FolderA/FolderB/FolderC/fileC.ts"],"names":["C","C.constructor"],"mappings":"AAAA;IAAAA;IACAC,CAACA;IAADD,QAACA;AAADA,CAACA,AADD,IACC"}

View file

@ -0,0 +1,4 @@
/// <reference path="FolderC/fileC.d.ts" />
declare class B {
c: C;
}

View file

@ -0,0 +1,7 @@
/// <reference path='FolderC/fileC.ts'/>
var B = (function () {
function B() {
}
return B;
})();
//# sourceMappingURL=fileB.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"fileB.js","sourceRoot":"","sources":["../../../FolderA/FolderB/fileB.ts"],"names":["B","B.constructor"],"mappings":"AACA,AADA,wCAAwC;;IACxCA;IAEAC,CAACA;IAADD,QAACA;AAADA,CAACA,AAFD,IAEC"}

View file

@ -0,0 +1,25 @@
{
"scenario": "rootDirectory: specify rootDirectory",
"projectRoot": "tests/cases/projects/rootDirectory",
"inputFiles": [
"FolderA/FolderB/fileB.ts"
],
"outDir": "outdir/simple",
"sourceMap": true,
"declaration": true,
"baselineCheck": true,
"rootDir": "FolderA",
"resolvedInputFiles": [
"lib.d.ts",
"FolderA/FolderB/FolderC/fileC.ts",
"FolderA/FolderB/fileB.ts"
],
"emittedFiles": [
"outdir/simple/FolderB/FolderC/fileC.js.map",
"outdir/simple/FolderB/FolderC/fileC.js",
"outdir/simple/FolderB/FolderC/fileC.d.ts",
"outdir/simple/FolderB/fileB.js.map",
"outdir/simple/FolderB/fileB.js",
"outdir/simple/FolderB/fileB.d.ts"
]
}

View file

@ -0,0 +1,123 @@
===================================================================
JsFile: fileC.js
mapUrl: fileC.js.map
sourceRoot:
sources: ../../../../FolderA/FolderB/FolderC/fileC.ts
===================================================================
-------------------------------------------------------------------
emittedFile:outdir/simple/FolderB/FolderC/fileC.js
sourceFile:../../../../FolderA/FolderB/FolderC/fileC.ts
-------------------------------------------------------------------
>>>var C = (function () {
1 >
2 >^^^^^^^^^^^^^^^^^^^->
1 >
1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
---
>>> function C() {
1->^^^^
2 > ^^->
1->
1->Emitted(2, 5) Source(1, 1) + SourceIndex(0) name (C)
---
>>> }
1->^^^^
2 > ^
3 > ^^^^^^^^^->
1->class C {
>
2 > }
1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (C.constructor)
2 >Emitted(3, 6) Source(2, 2) + SourceIndex(0) name (C.constructor)
---
>>> return C;
1->^^^^
2 > ^^^^^^^^
1->
2 > }
1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) name (C)
2 >Emitted(4, 13) Source(2, 2) + SourceIndex(0) name (C)
---
>>>})();
1 >
2 >^
3 >
4 > ^^^^
5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1 >
2 >}
3 >
4 > class C {
> }
1 >Emitted(5, 1) Source(2, 1) + SourceIndex(0) name (C)
2 >Emitted(5, 2) Source(2, 2) + SourceIndex(0) name (C)
3 >Emitted(5, 2) Source(1, 1) + SourceIndex(0)
4 >Emitted(5, 6) Source(2, 2) + SourceIndex(0)
---
>>>//# sourceMappingURL=fileC.js.map===================================================================
JsFile: fileB.js
mapUrl: fileB.js.map
sourceRoot:
sources: ../../../FolderA/FolderB/fileB.ts
===================================================================
-------------------------------------------------------------------
emittedFile:outdir/simple/FolderB/fileB.js
sourceFile:../../../FolderA/FolderB/fileB.ts
-------------------------------------------------------------------
>>>/// <reference path='FolderC/fileC.ts'/>
1 >
2 >
3 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1 >/// <reference path='FolderC/fileC.ts'/>
>
2 >
3 >/// <reference path='FolderC/fileC.ts'/>
1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0)
2 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
3 >Emitted(1, 41) Source(1, 41) + SourceIndex(0)
---
>>>var B = (function () {
>>> function B() {
1 >^^^^
2 > ^^->
1 >
>
1 >Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (B)
---
>>> }
1->^^^^
2 > ^
3 > ^^^^^^^^^->
1->class B {
> public c: C;
>
2 > }
1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (B.constructor)
2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (B.constructor)
---
>>> return B;
1->^^^^
2 > ^^^^^^^^
1->
2 > }
1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (B)
2 >Emitted(5, 13) Source(4, 2) + SourceIndex(0) name (B)
---
>>>})();
1 >
2 >^
3 >
4 > ^^^^
5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1 >
2 >}
3 >
4 > class B {
> public c: C;
> }
1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (B)
2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (B)
3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0)
4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0)
---
>>>//# sourceMappingURL=fileB.js.map

View file

@ -0,0 +1,2 @@
declare class C {
}

View file

@ -0,0 +1,6 @@
var C = (function () {
function C() {
}
return C;
})();
//# sourceMappingURL=fileC.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"fileC.js","sourceRoot":"","sources":["../../../../FolderA/FolderB/FolderC/fileC.ts"],"names":["C","C.constructor"],"mappings":"AAAA;IAAAA;IACAC,CAACA;IAADD,QAACA;AAADA,CAACA,AADD,IACC"}

View file

@ -0,0 +1,4 @@
/// <reference path="FolderC/fileC.d.ts" />
declare class B {
c: C;
}

View file

@ -0,0 +1,7 @@
/// <reference path='FolderC/fileC.ts'/>
var B = (function () {
function B() {
}
return B;
})();
//# sourceMappingURL=fileB.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"fileB.js","sourceRoot":"","sources":["../../../FolderA/FolderB/fileB.ts"],"names":["B","B.constructor"],"mappings":"AACA,AADA,wCAAwC;;IACxCA;IAEAC,CAACA;IAADD,QAACA;AAADA,CAACA,AAFD,IAEC"}

View file

@ -0,0 +1,25 @@
{
"scenario": "rootDirectory: specify rootDirectory",
"projectRoot": "tests/cases/projects/rootDirectory",
"inputFiles": [
"FolderA/FolderB/fileB.ts"
],
"outDir": "outdir/simple",
"sourceMap": true,
"declaration": true,
"baselineCheck": true,
"rootDir": "FolderA",
"resolvedInputFiles": [
"lib.d.ts",
"FolderA/FolderB/FolderC/fileC.ts",
"FolderA/FolderB/fileB.ts"
],
"emittedFiles": [
"outdir/simple/FolderB/FolderC/fileC.js.map",
"outdir/simple/FolderB/FolderC/fileC.js",
"outdir/simple/FolderB/FolderC/fileC.d.ts",
"outdir/simple/FolderB/fileB.js.map",
"outdir/simple/FolderB/fileB.js",
"outdir/simple/FolderB/fileB.d.ts"
]
}

View file

@ -0,0 +1,123 @@
===================================================================
JsFile: fileC.js
mapUrl: fileC.js.map
sourceRoot:
sources: ../../../../FolderA/FolderB/FolderC/fileC.ts
===================================================================
-------------------------------------------------------------------
emittedFile:outdir/simple/FolderB/FolderC/fileC.js
sourceFile:../../../../FolderA/FolderB/FolderC/fileC.ts
-------------------------------------------------------------------
>>>var C = (function () {
1 >
2 >^^^^^^^^^^^^^^^^^^^->
1 >
1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
---
>>> function C() {
1->^^^^
2 > ^^->
1->
1->Emitted(2, 5) Source(1, 1) + SourceIndex(0) name (C)
---
>>> }
1->^^^^
2 > ^
3 > ^^^^^^^^^->
1->class C {
>
2 > }
1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (C.constructor)
2 >Emitted(3, 6) Source(2, 2) + SourceIndex(0) name (C.constructor)
---
>>> return C;
1->^^^^
2 > ^^^^^^^^
1->
2 > }
1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) name (C)
2 >Emitted(4, 13) Source(2, 2) + SourceIndex(0) name (C)
---
>>>})();
1 >
2 >^
3 >
4 > ^^^^
5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1 >
2 >}
3 >
4 > class C {
> }
1 >Emitted(5, 1) Source(2, 1) + SourceIndex(0) name (C)
2 >Emitted(5, 2) Source(2, 2) + SourceIndex(0) name (C)
3 >Emitted(5, 2) Source(1, 1) + SourceIndex(0)
4 >Emitted(5, 6) Source(2, 2) + SourceIndex(0)
---
>>>//# sourceMappingURL=fileC.js.map===================================================================
JsFile: fileB.js
mapUrl: fileB.js.map
sourceRoot:
sources: ../../../FolderA/FolderB/fileB.ts
===================================================================
-------------------------------------------------------------------
emittedFile:outdir/simple/FolderB/fileB.js
sourceFile:../../../FolderA/FolderB/fileB.ts
-------------------------------------------------------------------
>>>/// <reference path='FolderC/fileC.ts'/>
1 >
2 >
3 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1 >/// <reference path='FolderC/fileC.ts'/>
>
2 >
3 >/// <reference path='FolderC/fileC.ts'/>
1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0)
2 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
3 >Emitted(1, 41) Source(1, 41) + SourceIndex(0)
---
>>>var B = (function () {
>>> function B() {
1 >^^^^
2 > ^^->
1 >
>
1 >Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (B)
---
>>> }
1->^^^^
2 > ^
3 > ^^^^^^^^^->
1->class B {
> public c: C;
>
2 > }
1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (B.constructor)
2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (B.constructor)
---
>>> return B;
1->^^^^
2 > ^^^^^^^^
1->
2 > }
1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (B)
2 >Emitted(5, 13) Source(4, 2) + SourceIndex(0) name (B)
---
>>>})();
1 >
2 >^
3 >
4 > ^^^^
5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1 >
2 >}
3 >
4 > class B {
> public c: C;
> }
1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (B)
2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (B)
3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0)
4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0)
---
>>>//# sourceMappingURL=fileB.js.map

View file

@ -0,0 +1,2 @@
declare class C {
}

View file

@ -0,0 +1,5 @@
var C = (function () {
function C() {
}
return C;
})();

View file

@ -0,0 +1,4 @@
/// <reference path="FolderC/fileC.d.ts" />
declare class B {
c: C;
}

View file

@ -0,0 +1,6 @@
/// <reference path='FolderC/fileC.ts'/>
var B = (function () {
function B() {
}
return B;
})();

View file

@ -0,0 +1,14 @@
error TS6059: File 'FolderA/FolderB/fileB.ts' is not under 'rootDir' 'FolderA/FolderB/FolderC'. 'rootDir' is expected to contain all source files.
!!! error TS6059: File 'fileB.ts' is not under 'rootDir' 'FolderA/FolderB/FolderC'. 'rootDir' is expected to contain all source files.
==== FolderA/FolderB/FolderC/fileC.ts (0 errors) ====
class C {
}
==== FolderA/FolderB/fileB.ts (0 errors) ====
/// <reference path='FolderC/fileC.ts'/>
class B {
public c: C;
}

View file

@ -0,0 +1,22 @@
{
"scenario": "rootDirectory: Files outside the rootDirectory",
"projectRoot": "tests/cases/projects/rootDirectory",
"inputFiles": [
"FolderA/FolderB/fileB.ts"
],
"outDir": "outdir/simple",
"declaration": true,
"baselineCheck": true,
"rootDir": "FolderA/FolderB/FolderC",
"resolvedInputFiles": [
"lib.d.ts",
"FolderA/FolderB/FolderC/fileC.ts",
"FolderA/FolderB/fileB.ts"
],
"emittedFiles": [
"outdir/simple/FolderC/fileC.js",
"outdir/simple/FolderC/fileC.d.ts",
"outdir/simple/fileB.js",
"outdir/simple/fileB.d.ts"
]
}

View file

@ -0,0 +1,2 @@
declare class C {
}

View file

@ -0,0 +1,5 @@
var C = (function () {
function C() {
}
return C;
})();

View file

@ -0,0 +1,4 @@
/// <reference path="FolderC/fileC.d.ts" />
declare class B {
c: C;
}

View file

@ -0,0 +1,6 @@
/// <reference path='FolderC/fileC.ts'/>
var B = (function () {
function B() {
}
return B;
})();

View file

@ -0,0 +1,14 @@
error TS6059: File 'FolderA/FolderB/fileB.ts' is not under 'rootDir' 'FolderA/FolderB/FolderC'. 'rootDir' is expected to contain all source files.
!!! error TS6059: File 'fileB.ts' is not under 'rootDir' 'FolderA/FolderB/FolderC'. 'rootDir' is expected to contain all source files.
==== FolderA/FolderB/FolderC/fileC.ts (0 errors) ====
class C {
}
==== FolderA/FolderB/fileB.ts (0 errors) ====
/// <reference path='FolderC/fileC.ts'/>
class B {
public c: C;
}

View file

@ -0,0 +1,22 @@
{
"scenario": "rootDirectory: Files outside the rootDirectory",
"projectRoot": "tests/cases/projects/rootDirectory",
"inputFiles": [
"FolderA/FolderB/fileB.ts"
],
"outDir": "outdir/simple",
"declaration": true,
"baselineCheck": true,
"rootDir": "FolderA/FolderB/FolderC",
"resolvedInputFiles": [
"lib.d.ts",
"FolderA/FolderB/FolderC/fileC.ts",
"FolderA/FolderB/fileB.ts"
],
"emittedFiles": [
"outdir/simple/FolderC/fileC.js",
"outdir/simple/FolderC/fileC.d.ts",
"outdir/simple/fileB.js",
"outdir/simple/fileB.d.ts"
]
}

View file

@ -0,0 +1,6 @@
var C = (function () {
function C() {
}
return C;
})();
//# sourceMappingURL=fileC.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"fileC.js","sourceRoot":"SourceRootPath/","sources":["FolderB/FolderC/fileC.ts"],"names":["C","C.constructor"],"mappings":"AAAA;IAAAA;IACAC,CAACA;IAADD,QAACA;AAADA,CAACA,AADD,IACC"}

View file

@ -0,0 +1,7 @@
/// <reference path='FolderC/fileC.ts'/>
var B = (function () {
function B() {
}
return B;
})();
//# sourceMappingURL=fileB.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"fileB.js","sourceRoot":"SourceRootPath/","sources":["FolderB/fileB.ts"],"names":["B","B.constructor"],"mappings":"AACA,AADA,wCAAwC;;IACxCA;IAEAC,CAACA;IAADD,QAACA;AAADA,CAACA,AAFD,IAEC"}

View file

@ -0,0 +1,23 @@
{
"scenario": "rootDirectory: specify rootDirectory with sourceRoot",
"projectRoot": "tests/cases/projects/rootDirectory",
"inputFiles": [
"FolderA/FolderB/fileB.ts"
],
"outDir": "outdir/simple",
"sourceMap": true,
"sourceRoot": "SourceRootPath",
"baselineCheck": true,
"rootDir": "FolderA",
"resolvedInputFiles": [
"lib.d.ts",
"FolderA/FolderB/FolderC/fileC.ts",
"FolderA/FolderB/fileB.ts"
],
"emittedFiles": [
"outdir/simple/FolderB/FolderC/fileC.js.map",
"outdir/simple/FolderB/FolderC/fileC.js",
"outdir/simple/FolderB/fileB.js.map",
"outdir/simple/FolderB/fileB.js"
]
}

View file

@ -0,0 +1,123 @@
===================================================================
JsFile: fileC.js
mapUrl: fileC.js.map
sourceRoot: SourceRootPath/
sources: FolderB/FolderC/fileC.ts
===================================================================
-------------------------------------------------------------------
emittedFile:outdir/simple/FolderB/FolderC/fileC.js
sourceFile:FolderB/FolderC/fileC.ts
-------------------------------------------------------------------
>>>var C = (function () {
1 >
2 >^^^^^^^^^^^^^^^^^^^->
1 >
1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
---
>>> function C() {
1->^^^^
2 > ^^->
1->
1->Emitted(2, 5) Source(1, 1) + SourceIndex(0) name (C)
---
>>> }
1->^^^^
2 > ^
3 > ^^^^^^^^^->
1->class C {
>
2 > }
1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (C.constructor)
2 >Emitted(3, 6) Source(2, 2) + SourceIndex(0) name (C.constructor)
---
>>> return C;
1->^^^^
2 > ^^^^^^^^
1->
2 > }
1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) name (C)
2 >Emitted(4, 13) Source(2, 2) + SourceIndex(0) name (C)
---
>>>})();
1 >
2 >^
3 >
4 > ^^^^
5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1 >
2 >}
3 >
4 > class C {
> }
1 >Emitted(5, 1) Source(2, 1) + SourceIndex(0) name (C)
2 >Emitted(5, 2) Source(2, 2) + SourceIndex(0) name (C)
3 >Emitted(5, 2) Source(1, 1) + SourceIndex(0)
4 >Emitted(5, 6) Source(2, 2) + SourceIndex(0)
---
>>>//# sourceMappingURL=fileC.js.map===================================================================
JsFile: fileB.js
mapUrl: fileB.js.map
sourceRoot: SourceRootPath/
sources: FolderB/fileB.ts
===================================================================
-------------------------------------------------------------------
emittedFile:outdir/simple/FolderB/fileB.js
sourceFile:FolderB/fileB.ts
-------------------------------------------------------------------
>>>/// <reference path='FolderC/fileC.ts'/>
1 >
2 >
3 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1 >/// <reference path='FolderC/fileC.ts'/>
>
2 >
3 >/// <reference path='FolderC/fileC.ts'/>
1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0)
2 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
3 >Emitted(1, 41) Source(1, 41) + SourceIndex(0)
---
>>>var B = (function () {
>>> function B() {
1 >^^^^
2 > ^^->
1 >
>
1 >Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (B)
---
>>> }
1->^^^^
2 > ^
3 > ^^^^^^^^^->
1->class B {
> public c: C;
>
2 > }
1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (B.constructor)
2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (B.constructor)
---
>>> return B;
1->^^^^
2 > ^^^^^^^^
1->
2 > }
1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (B)
2 >Emitted(5, 13) Source(4, 2) + SourceIndex(0) name (B)
---
>>>})();
1 >
2 >^
3 >
4 > ^^^^
5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1 >
2 >}
3 >
4 > class B {
> public c: C;
> }
1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (B)
2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (B)
3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0)
4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0)
---
>>>//# sourceMappingURL=fileB.js.map

View file

@ -0,0 +1,6 @@
var C = (function () {
function C() {
}
return C;
})();
//# sourceMappingURL=fileC.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"fileC.js","sourceRoot":"SourceRootPath/","sources":["FolderB/FolderC/fileC.ts"],"names":["C","C.constructor"],"mappings":"AAAA;IAAAA;IACAC,CAACA;IAADD,QAACA;AAADA,CAACA,AADD,IACC"}

View file

@ -0,0 +1,7 @@
/// <reference path='FolderC/fileC.ts'/>
var B = (function () {
function B() {
}
return B;
})();
//# sourceMappingURL=fileB.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"fileB.js","sourceRoot":"SourceRootPath/","sources":["FolderB/fileB.ts"],"names":["B","B.constructor"],"mappings":"AACA,AADA,wCAAwC;;IACxCA;IAEAC,CAACA;IAADD,QAACA;AAADA,CAACA,AAFD,IAEC"}

View file

@ -0,0 +1,23 @@
{
"scenario": "rootDirectory: specify rootDirectory with sourceRoot",
"projectRoot": "tests/cases/projects/rootDirectory",
"inputFiles": [
"FolderA/FolderB/fileB.ts"
],
"outDir": "outdir/simple",
"sourceMap": true,
"sourceRoot": "SourceRootPath",
"baselineCheck": true,
"rootDir": "FolderA",
"resolvedInputFiles": [
"lib.d.ts",
"FolderA/FolderB/FolderC/fileC.ts",
"FolderA/FolderB/fileB.ts"
],
"emittedFiles": [
"outdir/simple/FolderB/FolderC/fileC.js.map",
"outdir/simple/FolderB/FolderC/fileC.js",
"outdir/simple/FolderB/fileB.js.map",
"outdir/simple/FolderB/fileB.js"
]
}

View file

@ -0,0 +1,123 @@
===================================================================
JsFile: fileC.js
mapUrl: fileC.js.map
sourceRoot: SourceRootPath/
sources: FolderB/FolderC/fileC.ts
===================================================================
-------------------------------------------------------------------
emittedFile:outdir/simple/FolderB/FolderC/fileC.js
sourceFile:FolderB/FolderC/fileC.ts
-------------------------------------------------------------------
>>>var C = (function () {
1 >
2 >^^^^^^^^^^^^^^^^^^^->
1 >
1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
---
>>> function C() {
1->^^^^
2 > ^^->
1->
1->Emitted(2, 5) Source(1, 1) + SourceIndex(0) name (C)
---
>>> }
1->^^^^
2 > ^
3 > ^^^^^^^^^->
1->class C {
>
2 > }
1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (C.constructor)
2 >Emitted(3, 6) Source(2, 2) + SourceIndex(0) name (C.constructor)
---
>>> return C;
1->^^^^
2 > ^^^^^^^^
1->
2 > }
1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) name (C)
2 >Emitted(4, 13) Source(2, 2) + SourceIndex(0) name (C)
---
>>>})();
1 >
2 >^
3 >
4 > ^^^^
5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1 >
2 >}
3 >
4 > class C {
> }
1 >Emitted(5, 1) Source(2, 1) + SourceIndex(0) name (C)
2 >Emitted(5, 2) Source(2, 2) + SourceIndex(0) name (C)
3 >Emitted(5, 2) Source(1, 1) + SourceIndex(0)
4 >Emitted(5, 6) Source(2, 2) + SourceIndex(0)
---
>>>//# sourceMappingURL=fileC.js.map===================================================================
JsFile: fileB.js
mapUrl: fileB.js.map
sourceRoot: SourceRootPath/
sources: FolderB/fileB.ts
===================================================================
-------------------------------------------------------------------
emittedFile:outdir/simple/FolderB/fileB.js
sourceFile:FolderB/fileB.ts
-------------------------------------------------------------------
>>>/// <reference path='FolderC/fileC.ts'/>
1 >
2 >
3 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1 >/// <reference path='FolderC/fileC.ts'/>
>
2 >
3 >/// <reference path='FolderC/fileC.ts'/>
1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0)
2 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
3 >Emitted(1, 41) Source(1, 41) + SourceIndex(0)
---
>>>var B = (function () {
>>> function B() {
1 >^^^^
2 > ^^->
1 >
>
1 >Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (B)
---
>>> }
1->^^^^
2 > ^
3 > ^^^^^^^^^->
1->class B {
> public c: C;
>
2 > }
1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (B.constructor)
2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (B.constructor)
---
>>> return B;
1->^^^^
2 > ^^^^^^^^
1->
2 > }
1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (B)
2 >Emitted(5, 13) Source(4, 2) + SourceIndex(0) name (B)
---
>>>})();
1 >
2 >^
3 >
4 > ^^^^
5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1 >
2 >}
3 >
4 > class B {
> public c: C;
> }
1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (B)
2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (B)
3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0)
4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0)
---
>>>//# sourceMappingURL=fileB.js.map

View file

@ -55,7 +55,8 @@ class Greeter {
}
//// [sourceMapValidationDecorators.js]
var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) {
var __decorate = this.__decorate || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);

Some files were not shown because too many files have changed in this diff Show more