From b19743ffc6c28a98553ed3751ac85f1e0fdc4cd3 Mon Sep 17 00:00:00 2001 From: sosukesuzuki Date: Thu, 15 Oct 2020 23:35:35 +0900 Subject: [PATCH] Add test for babel/babel#12085 --- tests/typescript/declare/__snapshots__/jsfmt.spec.js.snap | 4 ++++ tests/typescript/declare/declare_function.ts | 2 ++ 2 files changed, 6 insertions(+) diff --git a/tests/typescript/declare/__snapshots__/jsfmt.spec.js.snap b/tests/typescript/declare/__snapshots__/jsfmt.spec.js.snap index 82d434d08950..fba2ff4d264e 100644 --- a/tests/typescript/declare/__snapshots__/jsfmt.spec.js.snap +++ b/tests/typescript/declare/__snapshots__/jsfmt.spec.js.snap @@ -50,6 +50,8 @@ declare namespace A { function y(): void; } +declare function f([]?) + =====================================output===================================== declare function x(); declare function y(): void; @@ -59,6 +61,8 @@ declare namespace A { function y(): void; } +declare function f([]?); + ================================================================================ `; diff --git a/tests/typescript/declare/declare_function.ts b/tests/typescript/declare/declare_function.ts index 67710eb24f78..d6b56a0c2c05 100644 --- a/tests/typescript/declare/declare_function.ts +++ b/tests/typescript/declare/declare_function.ts @@ -5,3 +5,5 @@ declare namespace A { function x(); function y(): void; } + +declare function f([]?)