diff --git a/src/compiler/transformers/declarations/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts index ca7df8f314c72..e215d65c05975 100644 --- a/src/compiler/transformers/declarations/localInferenceResolver.ts +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -61,6 +61,7 @@ import { LiteralExpression, MethodDeclaration, MethodSignature, + ModifierFlags, Node, NodeArray, NodeFlags, @@ -83,7 +84,9 @@ import { } from "../../types"; import { createDiagnosticForNode, + hasSyntacticModifier, isEntityNameExpression, + isOptionalDeclaration, } from "../../utilities"; import { isConstTypeReference, @@ -745,8 +748,22 @@ export function createLocalInferenceResolver({ localType = invalid(node); } - if (node.initializer && !(localType.flags & LocalTypeInfoFlags.Invalid) && strictNullChecks && !resolver.isOptionalParameter(node)) { - localType.typeNode = addUndefinedInUnion(localType.typeNode); + if (strictNullChecks && !(localType.flags & LocalTypeInfoFlags.Invalid)) { + const isOptional = resolver.isOptionalParameter(node); + /** + * If a parameter with a default value is not optional we need to add undefined + * function x(o = "", v: string) + */ + if (node.initializer && !isOptional) { + localType.typeNode = addUndefinedInUnion(localType.typeNode); + } + /** + * Constructor properties that are optional must have | undefined included to work well with exactOptionalPropertyTypes + * constructor(public x?: number) -> x?: number | undefined + */ + if (isOptional && !node.initializer && hasSyntacticModifier(node, ModifierFlags.ParameterPropertyModifier)) { + localType.typeNode = addUndefinedInUnion(localType.typeNode); + } } } else if (type) { @@ -764,7 +781,7 @@ export function createLocalInferenceResolver({ localType = invalid(node); } else if (isClassExpression(node.initializer)) { - localType = invalid(node.initializer, Diagnostics.Declaration_emit_for_class_expressions_are_not_supported_with_isolatedDeclarations) + localType = invalid(node.initializer, Diagnostics.Declaration_emit_for_class_expressions_are_not_supported_with_isolatedDeclarations); } else { localType = localInference(node.initializer, node.parent.flags & NodeFlags.Const ? NarrowBehavior.KeepLiterals : NarrowBehavior.None); @@ -772,6 +789,9 @@ export function createLocalInferenceResolver({ } else if (isPropertyDeclaration(node) && node.initializer) { localType = localInference(node.initializer); + if (isOptionalDeclaration(node)) { + localType.typeNode = addUndefinedInUnion(localType.typeNode); + } } else if (isInterfaceDeclaration(node.parent) || isTypeLiteralNode(node.parent)) { return factory.createKeywordTypeNode(SyntaxKind.AnyKeyword); diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitParameterProperty.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitParameterProperty.d.ts.map.diff new file mode 100644 index 0000000000000..d61d9d81f86ce --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitParameterProperty.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/declarationEmitParameterProperty.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [declarationEmitParameterProperty.d.ts.map] +-{"version":3,"file":"declarationEmitParameterProperty.d.ts","sourceRoot":"","sources":["declarationEmitParameterProperty.ts"],"names":[],"mappings":"AAAA,qBAAa,GAAG;IACK,GAAG,CAAC;gBAAJ,GAAG,CAAC,oBAAQ;CAEhC"} ++{"version":3,"file":"declarationEmitParameterProperty.d.ts","sourceRoot":"","sources":["declarationEmitParameterProperty.ts"],"names":[],"mappings":"AAAA,qBAAa,GAAG;IACK,GAAG,CAAC,EAAE,MAAM;gBAAZ,GAAG,CAAC,EAAE,MAAM,YAAA;CAEhC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY2xhc3MgRm9vIHsNCiAgICBiYXI/OiBzdHJpbmcgfCB1bmRlZmluZWQ7DQogICAgY29uc3RydWN0b3IoYmFyPzogc3RyaW5nIHwgdW5kZWZpbmVkKTsNCn0NCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWRlY2xhcmF0aW9uRW1pdFBhcmFtZXRlclByb3BlcnR5LmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0UGFyYW1ldGVyUHJvcGVydHkuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImRlY2xhcmF0aW9uRW1pdFBhcmFtZXRlclByb3BlcnR5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLHFCQUFhLEdBQUc7SUFDSyxHQUFHLENBQUM7Z0JBQUosR0FBRyxDQUFDLG9CQUFRO0NBRWhDIn0=,ZXhwb3J0IGNsYXNzIEZvbyB7CiAgY29uc3RydWN0b3IocHVibGljIGJhcj86IHN0cmluZykgewogIH0KfQo= ++//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY2xhc3MgRm9vIHsNCiAgICBiYXI/OiBzdHJpbmcgfCB1bmRlZmluZWQ7DQogICAgY29uc3RydWN0b3IoYmFyPzogc3RyaW5nIHwgdW5kZWZpbmVkKTsNCn0NCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWRlY2xhcmF0aW9uRW1pdFBhcmFtZXRlclByb3BlcnR5LmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0UGFyYW1ldGVyUHJvcGVydHkuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImRlY2xhcmF0aW9uRW1pdFBhcmFtZXRlclByb3BlcnR5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLHFCQUFhLEdBQUc7SUFDSyxHQUFHLENBQUMsRUFBRSxNQUFNO2dCQUFaLEdBQUcsQ0FBQyxFQUFFLE1BQU0sWUFBQTtDQUVoQyJ9,ZXhwb3J0IGNsYXNzIEZvbyB7CiAgY29uc3RydWN0b3IocHVibGljIGJhcj86IHN0cmluZykgewogIH0KfQo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/optionalMethods.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/optionalMethods.d.ts.map.diff new file mode 100644 index 0000000000000..a9b3d7fa02641 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/optionalMethods.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/conformance/types/namedTypes/optionalMethods.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [optionalMethods.d.ts.map] +-{"version":3,"file":"optionalMethods.d.ts","sourceRoot":"","sources":["optionalMethods.ts"],"names":[],"mappings":"AAAA,UAAU,GAAG;IACT,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,IAAI,MAAM,CAAC;IACZ,CAAC,CAAC,IAAI,MAAM,CAAC;CAChB;AAED,iBAAS,KAAK,CAAC,CAAC,EAAE,GAAG,GAAG,IAAI,CAQ3B;AAED,cAAM,GAAG;IAIc,CAAC,CAAC;IAAiB,CAAC;IAHvC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,qBAAK;gBACY,CAAC,CAAC,oBAAQ,EAAS,CAAC,SAAK;IAC5C,CAAC,IAAI,MAAM;IAGX,CAAC,CAAC,IAAI,MAAM;IACZ,CAAC,CAAC,IAAI,MAAM;CAGf;AAED,iBAAS,KAAK,CAAC,CAAC,EAAE,GAAG,GAAG,IAAI,CAa3B;AAED,cAAM,IAAI;IACN,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,IAAI,MAAM;CACf;AAED,cAAM,OAAQ,SAAQ,IAAI;IACtB,CAAC,SAAK;IACN,CAAC,IAAI,MAAM;CACd"} ++{"version":3,"file":"optionalMethods.d.ts","sourceRoot":"","sources":["optionalMethods.ts"],"names":[],"mappings":"AAAA,UAAU,GAAG;IACT,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,IAAI,MAAM,CAA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iA9IHguaCA/IHguaCgpIDogMDsKfQoKY2xhc3MgQmFzZSB7CiAgICBhPzogbnVtYmVyOwogICAgZj8oKTogbnVtYmVyOwp9CgpjbGFzcyBEZXJpdmVkIGV4dGVuZHMgQmFzZSB7CiAgICBhID0gMTsKICAgIGYoKTogbnVtYmVyIHsgcmV0dXJuIDE7IH0KfQo= ++//// https://sokra.github.io/source-map-visualization#base64,aW50ZXJmYWNlIEZvbyB7DQogICAgYTogbnVtYmVyOw0KICAgIGI/OiBudW1iZXI7DQogICAgZigpOiBudW1iZXI7DQogICAgZz8oKTogbnVtYmVyOw0KfQ0KZGVjbGFyZSBmdW5jdGlvbiB0ZXN0MSh4OiBGb28pOiB2b2lkOw0KZGVjbGFyZSBjbGFzcyBCYXIgew0KICAgIGQ/OiBudW1iZXIgfCB1bmRlZmluZWQ7DQogICAgZTogbnVtYmVyOw0KICAgIGE6IG51bWJlcjsNCiAgICBiPzogbnVtYmVyOw0KICAgIGM/OiBudW1iZXIgfCB1bmRlZmluZWQ7DQogICAgY29uc3RydWN0b3IoZD86IG51bWJlciB8IHVuZGVmaW5lZCwgZT86IG51bWJlcik7DQogICAgZigpOiBudW1iZXI7DQogICAgZz8oKTogbnVtYmVyOw0KICAgIGg/KCk6IG51bWJlcjsNCn0NCmRlY2xhcmUgZnVuY3Rpb24gdGVzdDIoeDogQmFyKTogdm9pZDsNCmRlY2xhcmUgY2xhc3MgQmFzZSB7DQogICAgYT86IG51bWJlcjsNCiAgICBmPygpOiBudW1iZXI7DQp9DQpkZWNsYXJlIGNsYXNzIERlcml2ZWQgZXh0ZW5kcyBCYXNlIHsNCiAgICBhOiBudW1iZXI7DQogICAgZigpOiBudW1iZXI7DQp9DQovLyMgc291cmNlTWFwcGluZ1VSTD1vcHRpb25hbE1ldGhvZHMuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3B0aW9uYWxNZXRob2RzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJ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QgewogICAgeC5hOwogICAgeC5iOwogICAgeC5mOwogICAgeC5nOwogICAgbGV0IGYxID0geC5mKCk7CiAgICBsZXQgZzEgPSB4LmcgJiYgeC5nKCk7CiAgICBsZXQgZzIgPSB4LmcgPyB4LmcoKSA6IDA7Cn0KCmNsYXNzIEJhciB7CiAgICBhOiBudW1iZXI7CiAgICBiPzogbnVtYmVyOwogICAgYz8gPSAyOwogICAgY29uc3RydWN0b3IocHVibGljIGQ/OiBudW1iZXIsIHB1YmxpYyBlID0gMTApIHt9CiAgICBmKCk6IG51bWJlciB7CiAgICAgICAgcmV0dXJuIDE7CiAgICB9CiAgICBnPygpOiBudW1iZXI7ICAvLyBCb2R5IG9mIG9wdGlvbmFsIG1ldGhvZCBjYW4gYmUgb21pdHRlZAogICAgaD8oKTogbnVtYmVyIHsKICAgICAgICByZXR1cm4gMjsKICAgIH0KfQoKZnVuY3Rpb24gdGVzdDIoeDogQmFyKTogdm9pZCB7CiAgICB4LmE7CiAgICB4LmI7CiAgICB4LmM7CiAgICB4LmQ7CiAgICB4LmU7CiAgICB4LmY7CiAgICB4Lmc7CiAgICBsZXQgZjEgPSB4LmYoKTsKICAgIGxldCBnMSA9IHguZyAmJiB4LmcoKTsKICAgIGxldCBnMiA9IHguZyA/IHguZygpIDogMDsKICAgIGxldCBoMSA9IHguaCAmJiB4LmgoKTsKICAgIGxldCBoMiA9IHguaCA/IHguaCgpIDogMDsKfQoKY2xhc3MgQmFzZSB7CiAgICBhPzogbnVtYmVyOwogICAgZj8oKTogbnVtYmVyOwp9CgpjbGFzcyBEZXJpdmVkIGV4dGVuZHMgQmFzZSB7CiAgICBhID0gMTsKICAgIGYoKTogbnVtYmVyIHsgcmV0dXJuIDE7IH0KfQo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitParameterProperty.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitParameterProperty.d.ts.map new file mode 100644 index 0000000000000..daade8fde7e38 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitParameterProperty.d.ts.map @@ -0,0 +1,23 @@ +//// [tests/cases/compiler/declarationEmitParameterProperty.ts] //// + + + +/// [Declarations] //// + + + +//// [declarationEmitParameterProperty.d.ts] +export declare class Foo { + bar?: string | undefined; + constructor(bar?: string | undefined); +} +//# sourceMappingURL=declarationEmitParameterProperty.d.ts.map + +/// [Declarations Maps] //// + + +//// [declarationEmitParameterProperty.d.ts.map] +{"version":3,"file":"declarationEmitParameterProperty.d.ts","sourceRoot":"","sources":["declarationEmitParameterProperty.ts"],"names":[],"mappings":"AAAA,qBAAa,GAAG;IACK,GAAG,CAAC,EAAE,MAAM;gBAAZ,GAAG,CAAC,EAAE,MAAM,YAAA;CAEhC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY2xhc3MgRm9vIHsNCiAgICBiYXI/OiBzdHJpbmcgfCB1bmRlZmluZWQ7DQogICAgY29uc3RydWN0b3IoYmFyPzogc3RyaW5nIHwgdW5kZWZpbmVkKTsNCn0NCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWRlY2xhcmF0aW9uRW1pdFBhcmFtZXRlclByb3BlcnR5LmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0UGFyYW1ldGVyUHJvcGVydHkuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImRlY2xhcmF0aW9uRW1pdFBhcmFtZXRlclByb3BlcnR5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLHFCQUFhLEdBQUc7SUFDSyxHQUFHLENBQUMsRUFBRSxNQUFNO2dCQUFaLEdBQUcsQ0FBQyxFQUFFLE1BQU0sWUFBQTtDQUVoQyJ9,ZXhwb3J0IGNsYXNzIEZvbyB7CiAgY29uc3RydWN0b3IocHVibGljIGJhcj86IHN0cmluZykgewogIH0KfQo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/optionalMethods.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/optionalMethods.d.ts.map new file mode 100644 index 0000000000000..fcd90228c2f88 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/optionalMethods.d.ts.map @@ -0,0 +1,46 @@ +//// [tests/cases/conformance/types/namedTypes/optionalMethods.ts] //// + + + +/// [Declarations] //// + + + +//// [optionalMethods.d.ts] +interface Foo { + a: number; + b?: number; + f(): number; + g?(): number; +} +declare function test1(x: Foo): void; +declare class Bar { + d?: number | undefined; + e: number; + a: number; + b?: number; + c?: number | undefined; + constructor(d?: number | undefined, e?: number); + f(): number; + g?(): number; + h?(): number; +} +declare function test2(x: Bar): void; +declare class Base { + a?: number; + f?(): number; +} +declare class Derived extends Base { + a: number; + f(): number; +} +//# sourceMappingURL=optionalMethods.d.ts.map + +/// [Declarations Maps] //// + + +//// [optionalMethods.d.ts.map] +{"version":3,"file":"optionalMethods.d.ts","sourceRoot":"","sources":["optionalMethods.ts"],"names":[],"mappings":"AAAA,UAAU,GAAG;IACT,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,IAAI,MAAM,CAAC;IACZ,CAAC,CAAC,IAAI,MAAM,CAAC;CAChB;AAED,iBAAS,KAAK,CAAC,CAAC,EAAE,GAAG,GAAG,IAAI,CAQ3B;AAED,cAAM,GAAG;IAIc,CAAC,CAAC,EAAE,MAAM;IAAS,CAAC;IAHvC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,qBAAK;gBACY,CAAC,CAAC,EAAE,MAAM,YAAA,EAAS,CAAC,SAAK;IAC5C,CAAC,IAAI,MAAM;IAGX,CAAC,CAAC,IAAI,MAAM;IACZ,CAAC,CAAC,IAAI,MAAM;CAGf;AAED,iBAAS,KAAK,CAAC,CAAC,EAAE,GAAG,GAAG,IAAI,CAa3B;AAED,cAAM,IAAI;IACN,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,IAAI,MAAM;CACf;AAED,cAAM,OAAQ,SAAQ,IAAI;IACtB,CAAC,SAAK;IACN,CAAC,IAAI,MAAM;CACd"} + +//// https://sokra.github.io/source-map-visualization#base64,aW50ZXJmYWNlIEZvbyB7DQogICAgYTogbnVtYmVyOw0KICAgIGI/OiBudW1iZXI7DQogICAgZigpOiBudW1iZXI7DQogICAgZz8oKTogbnVtYmVyOw0KfQ0KZGVjbGFyZSBmdW5jdGlvbiB0ZXN0MSh4OiBGb28pOiB2b2lkOw0KZGVjbGFyZSBjbGFzcyBCYXIgew0KICAgIGQ/OiBudW1iZXIgfCB1bmRlZmluZWQ7DQogICAgZTogbnVtYmVyOw0KICAgIGE6IG51bWJlcjsNCiAgICBiPzogbnVtYmVyOw0KICAgIGM/OiBudW1iZXIgfCB1bmRlZmluZWQ7DQogICAgY29uc3RydWN0b3IoZD86IG51bWJlciB8IHVuZGVmaW5lZCwgZT86IG51bWJlcik7DQogICAgZigpOiBudW1iZXI7DQogICAgZz8oKTogbnVtYmVyOw0KICAgIGg/KCk6IG51bWJlcjsNCn0NCmRlY2xhcmUgZnVuY3Rpb24gdGVzdDIoeDogQmFyKTogdm9pZDsNCmRlY2xhcmUgY2xhc3MgQmFzZSB7DQogICAgYT86IG51bWJlcjsNCiAgICBmPygpOiBudW1iZXI7DQp9DQpkZWNsYXJlIGNsYXNzIERlcml2ZWQgZXh0ZW5kcyBCYXNlIHsNCiAgICBhOiBudW1iZXI7DQogICAgZigpOiBudW1iZXI7DQp9DQovLyMgc291cmNlTWFwcGluZ1VSTD1vcHRpb25hbE1ldGhvZHMuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3B0aW9uYWxNZXRob2RzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJvcHRpb25hbE1ldGhvZHMudHMiXSwibmFtZXMiOltdLC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5nOwogICAgbGV0IGYxID0geC5mKCk7CiAgICBsZXQgZzEgPSB4LmcgJiYgeC5nKCk7CiAgICBsZXQgZzIgPSB4LmcgPyB4LmcoKSA6IDA7Cn0KCmNsYXNzIEJhciB7CiAgICBhOiBudW1iZXI7CiAgICBiPzogbnVtYmVyOwogICAgYz8gPSAyOwogICAgY29uc3RydWN0b3IocHVibGljIGQ/OiBudW1iZXIsIHB1YmxpYyBlID0gMTApIHt9CiAgICBmKCk6IG51bWJlciB7CiAgICAgICAgcmV0dXJuIDE7CiAgICB9CiAgICBnPygpOiBudW1iZXI7ICAvLyBCb2R5IG9mIG9wdGlvbmFsIG1ldGhvZCBjYW4gYmUgb21pdHRlZAogICAgaD8oKTogbnVtYmVyIHsKICAgICAgICByZXR1cm4gMjsKICAgIH0KfQoKZnVuY3Rpb24gdGVzdDIoeDogQmFyKTogdm9pZCB7CiAgICB4LmE7CiAgICB4LmI7CiAgICB4LmM7CiAgICB4LmQ7CiAgICB4LmU7CiAgICB4LmY7CiAgICB4Lmc7CiAgICBsZXQgZjEgPSB4LmYoKTsKICAgIGxldCBnMSA9IHguZyAmJiB4LmcoKTsKICAgIGxldCBnMiA9IHguZyA/IHguZygpIDogMDsKICAgIGxldCBoMSA9IHguaCAmJiB4LmgoKTsKICAgIGxldCBoMiA9IHguaCA/IHguaCgpIDogMDsKfQoKY2xhc3MgQmFzZSB7CiAgICBhPzogbnVtYmVyOwogICAgZj8oKTogbnVtYmVyOwp9CgpjbGFzcyBEZXJpdmVkIGV4dGVuZHMgQmFzZSB7CiAgICBhID0gMTsKICAgIGYoKTogbnVtYmVyIHsgcmV0dXJuIDE7IH0KfQo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitParameterProperty.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitParameterProperty.d.ts.map new file mode 100644 index 0000000000000..078bd3fb79d91 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitParameterProperty.d.ts.map @@ -0,0 +1,23 @@ +//// [tests/cases/compiler/declarationEmitParameterProperty.ts] //// + + + +/// [Declarations] //// + + + +//// [declarationEmitParameterProperty.d.ts] +export declare class Foo { + bar?: string | undefined; + constructor(bar?: string | undefined); +} +//# sourceMappingURL=declarationEmitParameterProperty.d.ts.map + +/// [Declarations Maps] //// + + +//// [declarationEmitParameterProperty.d.ts.map] +{"version":3,"file":"declarationEmitParameterProperty.d.ts","sourceRoot":"","sources":["declarationEmitParameterProperty.ts"],"names":[],"mappings":"AAAA,qBAAa,GAAG;IACK,GAAG,CAAC;gBAAJ,GAAG,CAAC,oBAAQ;CAEhC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY2xhc3MgRm9vIHsNCiAgICBiYXI/OiBzdHJpbmcgfCB1bmRlZmluZWQ7DQogICAgY29uc3RydWN0b3IoYmFyPzogc3RyaW5nIHwgdW5kZWZpbmVkKTsNCn0NCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWRlY2xhcmF0aW9uRW1pdFBhcmFtZXRlclByb3BlcnR5LmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0UGFyYW1ldGVyUHJvcGVydHkuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImRlY2xhcmF0aW9uRW1pdFBhcmFtZXRlclByb3BlcnR5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLHFCQUFhLEdBQUc7SUFDSyxHQUFHLENBQUM7Z0JBQUosR0FBRyxDQUFDLG9CQUFRO0NBRWhDIn0=,ZXhwb3J0IGNsYXNzIEZvbyB7CiAgY29uc3RydWN0b3IocHVibGljIGJhcj86IHN0cmluZykgewogIH0KfQo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/optionalMethods.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/optionalMethods.d.ts.map new file mode 100644 index 0000000000000..4f775a3310322 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/optionalMethods.d.ts.map @@ -0,0 +1,46 @@ +//// [tests/cases/conformance/types/namedTypes/optionalMethods.ts] //// + + + +/// [Declarations] //// + + + +//// [optionalMethods.d.ts] +interface Foo { + a: number; + b?: number; + f(): number; + g?(): number; +} +declare function test1(x: Foo): void; +declare class Bar { + d?: number | undefined; + e: number; + a: number; + b?: number; + c?: number | undefined; + constructor(d?: number | undefined, e?: number); + f(): number; + g?(): number; + h?(): number; +} +declare function test2(x: Bar): void; +declare class Base { + a?: number; + f?(): number; +} +declare class Derived extends Base { + a: number; + f(): number; +} +//# sourceMappingURL=optionalMethods.d.ts.map + +/// [Declarations Maps] //// + + +//// [optionalMethods.d.ts.map] +{"version":3,"file":"optionalMethods.d.ts","sourceRoot":"","sources":["optionalMethods.ts"],"names":[],"mappings":"AAAA,UAAU,GAAG;IACT,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,IAAI,MAAM,CAAC;IACZ,CAAC,CAAC,IAAI,MAAM,CAAC;CAChB;AAED,iBAAS,KAAK,CAAC,CAAC,EAAE,GAAG,GAAG,IAAI,CAQ3B;AAED,cAAM,GAAG;IAIc,CAAC,CAAC;IAAiB,CAAC;IAHvC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,qBAAK;gBACY,CAAC,CAAC,oBAAQ,EAAS,CAAC,SAAK;IAC5C,CAAC,IAAI,MAAM;IAGX,CAAC,CAAC,IAAI,MAAM;IACZ,CAAC,CAAC,IAAI,MAAM;CAGf;AAED,iBAAS,KAAK,CAAC,CAAC,EAAE,GAAG,GAAG,IAAI,CAa3B;AAED,cAAM,IAAI;IACN,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,IAAI,MAAM;CACf;AAED,cAAM,OAAQ,SAAQ,IAAI;IACtB,CAAC,SAAK;IACN,CAAC,IAAI,MAAM;CACd"} + +//// https://sokra.github.io/source-map-visualization#base64,aW50ZXJmYWNlIEZvbyB7DQogICAgYTogbnVtYmVyOw0KICAgIGI/OiBudW1iZXI7DQogICAgZigpOiBudW1iZXI7DQogICAgZz8oKTogbnVtYmVyOw0KfQ0KZGVjbGFyZSBmdW5jdGlvbiB0ZXN0MSh4OiBGb28pOiB2b2lkOw0KZGVjbGFyZSBjbGFzcyBCYXIgew0KICAgIGQ/OiBudW1iZXIgfCB1bmRlZmluZWQ7DQogICAgZTogbnVtYmVyOw0KICAgIGE6IG51bWJlcjsNCiAgICBiPzogbnVtYmVyOw0KICAgIGM/OiBudW1iZXIgfCB1bmRlZmluZWQ7DQogICAgY29uc3RydWN0b3IoZD86IG51bWJlciB8IHVuZGVmaW5lZCwgZT86IG51bWJlcik7DQogICAgZigpOiBudW1iZXI7DQogICAgZz8oKTogbnVtYmVyOw0KICAgIGg/KCk6IG51bWJlcjsNCn0NCmRlY2xhcmUgZnVuY3Rpb24gdGVzdDIoeDogQmFyKTogdm9pZDsNCmRlY2xhcmUgY2xhc3MgQmFzZSB7DQogICAgYT86IG51bWJlcjsNCiAgICBmPygpOiBudW1iZXI7DQp9DQpkZWNsYXJlIGNsYXNzIERlcml2ZWQgZXh0ZW5kcyBCYXNlIHsNCiAgICBhOiBudW1iZXI7DQogICAgZigpOiBudW1iZXI7DQp9DQovLyMgc291cmNlTWFwcGluZ1VSTD1vcHRpb25hbE1ldGhvZHMuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3B0aW9uYWxNZXRob2RzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJvcHRpb25hbE1ldGhvZHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsVUFBVSxHQUFHO0lBQ1QsQ0FBQyxFQUFFLE1BQU0sQ0FBQztJQUNWLENBQUMsQ0FBQyxFQUF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7CiAgICBhOiBudW1iZXI7CiAgICBiPzogbnVtYmVyOwogICAgYz8gPSAyOwogICAgY29uc3RydWN0b3IocHVibGljIGQ/OiBudW1iZXIsIHB1YmxpYyBlID0gMTApIHt9CiAgICBmKCk6IG51bWJlciB7CiAgICAgICAgcmV0dXJuIDE7CiAgICB9CiAgICBnPygpOiBudW1iZXI7ICAvLyBCb2R5IG9mIG9wdGlvbmFsIG1ldGhvZCBjYW4gYmUgb21pdHRlZAogICAgaD8oKTogbnVtYmVyIHsKICAgICAgICByZXR1cm4gMjsKICAgIH0KfQoKZnVuY3Rpb24gdGVzdDIoeDogQmFyKTogdm9pZCB7CiAgICB4LmE7CiAgICB4LmI7CiAgICB4LmM7CiAgICB4LmQ7CiAgICB4LmU7CiAgICB4LmY7CiAgICB4Lmc7CiAgICBsZXQgZjEgPSB4LmYoKTsKICAgIGxldCBnMSA9IHguZyAmJiB4LmcoKTsKICAgIGxldCBnMiA9IHguZyA/IHguZygpIDogMDsKICAgIGxldCBoMSA9IHguaCAmJiB4LmgoKTsKICAgIGxldCBoMiA9IHguaCA/IHguaCgpIDogMDsKfQoKY2xhc3MgQmFzZSB7CiAgICBhPzogbnVtYmVyOwogICAgZj8oKTogbnVtYmVyOwp9CgpjbGFzcyBEZXJpdmVkIGV4dGVuZHMgQmFzZSB7CiAgICBhID0gMTsKICAgIGYoKTogbnVtYmVyIHsgcmV0dXJuIDE7IH0KfQo= + diff --git a/tests/cases/compiler/declarationEmitParameterProperty.ts b/tests/cases/compiler/declarationEmitParameterProperty.ts index 53cf3198bf746..6528c1e037604 100644 --- a/tests/cases/compiler/declarationEmitParameterProperty.ts +++ b/tests/cases/compiler/declarationEmitParameterProperty.ts @@ -1,6 +1,6 @@ // @strictNullChecks: true // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO: Optional constructor properties. +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed export class Foo { constructor(public bar?: string) { } diff --git a/tests/cases/conformance/types/namedTypes/optionalMethods.ts b/tests/cases/conformance/types/namedTypes/optionalMethods.ts index 1490ec66769b9..5385b0087b74f 100644 --- a/tests/cases/conformance/types/namedTypes/optionalMethods.ts +++ b/tests/cases/conformance/types/namedTypes/optionalMethods.ts @@ -1,6 +1,6 @@ // @strictNullChecks: true // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO: Optional constructor properties. +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed interface Foo { a: number;