From f835433221e51a04d0c063bb3ac4d5354ceb2556 Mon Sep 17 00:00:00 2001 From: Artem Kobzar Date: Mon, 24 Jan 2022 15:45:12 +0100 Subject: [PATCH] test: add optional argument d.ts generation. --- .../typescript-export/declarations/declarations.d.ts | 4 ++-- .../testData/typescript-export/namespaces/namespaces.d.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/js/js.translator/testData/typescript-export/declarations/declarations.d.ts b/js/js.translator/testData/typescript-export/declarations/declarations.d.ts index dfbf5a06e27..a6f40549ea7 100644 --- a/js/js.translator/testData/typescript-export/declarations/declarations.d.ts +++ b/js/js.translator/testData/typescript-export/declarations/declarations.d.ts @@ -13,7 +13,7 @@ declare namespace JS_TESTS { function varargWithOtherParameters(x: string, y: Array, z: string): number; function varargWithComplexType(x: Array<(p0: Array) => Array>): number; function sumNullable(x: Nullable, y: Nullable): number; - function defaultParameters(x: number, y: string): string; + function defaultParameters(x?: number, y?: string): string; function generic1(x: T): T; function generic2(x: Nullable): boolean; function genericWithConstraint(x: T): T; @@ -94,7 +94,7 @@ declare namespace JS_TESTS { constructor(name: string); get name(): string; component1(): string; - copy(name: string): foo.TestDataClass; + copy(name?: string): foo.TestDataClass; toString(): string; hashCode(): number; equals(other: Nullable): boolean; diff --git a/js/js.translator/testData/typescript-export/namespaces/namespaces.d.ts b/js/js.translator/testData/typescript-export/namespaces/namespaces.d.ts index ad0a287402c..e5c2a5310a5 100644 --- a/js/js.translator/testData/typescript-export/namespaces/namespaces.d.ts +++ b/js/js.translator/testData/typescript-export/namespaces/namespaces.d.ts @@ -7,7 +7,7 @@ declare namespace JS_TESTS { constructor(value: string); get value(): string; component1(): string; - copy(value: string): foo.bar.baz.C1; + copy(value?: string): foo.bar.baz.C1; toString(): string; hashCode(): number; equals(other: Nullable): boolean; @@ -19,7 +19,7 @@ declare namespace JS_TESTS { constructor(value: string); get value(): string; component1(): string; - copy(value: string): a.b.C2; + copy(value?: string): a.b.C2; toString(): string; hashCode(): number; equals(other: Nullable): boolean; @@ -30,7 +30,7 @@ declare namespace JS_TESTS { constructor(value: string); get value(): string; component1(): string; - copy(value: string): C3; + copy(value?: string): C3; toString(): string; hashCode(): number; equals(other: Nullable): boolean;