Files
tsgo/testdata/baselines/reference/submodule/transpile/declarationFunctionDeclarations.d.ts.diff
2026-08-11 02:04:48 +00:00

54 lines
3.7 KiB
Diff

--- old.transpile/declarationFunctionDeclarations.d.ts
+++ new.transpile/declarationFunctionDeclarations.d.ts
@@= skipped -139, +139 lines =@@
//// [Diagnostics reported]
-fnDecl.ts(12,27): error TS9025: Declaration emit for this parameter requires implicitly adding undefined to its type. This is not supported with --isolatedDeclarations.
fnDecl.ts(16,36): error TS9025: Declaration emit for this parameter requires implicitly adding undefined to its type. This is not supported with --isolatedDeclarations.
fnDecl.ts(20,26): error TS9025: Declaration emit for this parameter requires implicitly adding undefined to its type. This is not supported with --isolatedDeclarations.
fnDecl.ts(24,56): error TS9025: Declaration emit for this parameter requires implicitly adding undefined to its type. This is not supported with --isolatedDeclarations.
@@= skipped -8, +7 lines =@@
fnDecl.ts(32,45): error TS9025: Declaration emit for this parameter requires implicitly adding undefined to its type. This is not supported with --isolatedDeclarations.
fnDecl.ts(37,47): error TS9025: Declaration emit for this parameter requires implicitly adding undefined to its type. This is not supported with --isolatedDeclarations.
fnDecl.ts(41,37): error TS9025: Declaration emit for this parameter requires implicitly adding undefined to its type. This is not supported with --isolatedDeclarations.
-fnDecl.ts(45,35): error TS9025: Declaration emit for this parameter requires implicitly adding undefined to its type. This is not supported with --isolatedDeclarations.
-fnDecl.ts(51,5): error TS9025: Declaration emit for this parameter requires implicitly adding undefined to its type. This is not supported with --isolatedDeclarations.
-
-
-==== fnDecl.ts (10 errors) ====
+
+
+==== fnDecl.ts (7 errors) ====
type T = number[]
export function fnDeclBasic1(p: number[] | string[] | [T] = [], rParam: string): void { };
export function fnDeclBasic2(p: (n: T) => T = () => null!, rParam: string): void { };
@@= skipped -17, +15 lines =@@
export function fnDeclHasUndefined(p: T | undefined = [], rParam: string): void { };
export function fnDeclBad(p: T = [], rParam: string): void { };
- ~~~~~~~~~
-!!! error TS9025: Declaration emit for this parameter requires implicitly adding undefined to its type. This is not supported with --isolatedDeclarations.
-!!! related TS9028 fnDecl.ts:12:27: Add a type annotation to the parameter p.
export const fnExprOk1 = function (array: number[] = [], rParam: string): void { };
export const fnExprOk2 = function (array: T | undefined = [], rParam: string): void { };
@@= skipped -57, +54 lines =@@
export class InClassMethodOk1 { o(array: number[] = [], rParam: string): void { } };
export class InClassMethodOk2 { o(array: T | undefined = [], rParam: string): void { } };
export class InClassMethodBad { o(array: T = [], rParam: string): void { } };
- ~~~~~~~~~~~~~
-!!! error TS9025: Declaration emit for this parameter requires implicitly adding undefined to its type. This is not supported with --isolatedDeclarations.
-!!! related TS9028 fnDecl.ts:45:35: Add a type annotation to the parameter array.
// https://github.com/microsoft/TypeScript/issues/60976
class Bar {}
export class ClsWithRequiredInitializedParameter {
constructor(
private arr: Bar = new Bar(),
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-!!! error TS9025: Declaration emit for this parameter requires implicitly adding undefined to its type. This is not supported with --isolatedDeclarations.
-!!! related TS9028 fnDecl.ts:51:5: Add a type annotation to the parameter arr.
private bool: boolean,
) {}
}