Skip to content

Commit a32013b

Browse files
Accepted baselines.
1 parent f529457 commit a32013b

File tree

4 files changed

+18
-17
lines changed

4 files changed

+18
-17
lines changed

tests/baselines/reference/controlFlowForCatchAndFinally.types

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class Foo {
120120
>Aborter : typeof Aborter
121121

122122
} catch (error) {
123-
>error : any
123+
>error : unknown
124124

125125
if (this.abortController !== undefined) {
126126
>this.abortController !== undefined : boolean

tests/baselines/reference/tryCatchFinallyControlFlow.types

+15-15
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ function f1() {
1919
>a : number
2020
}
2121
catch (e) {
22-
>e : any
22+
>e : unknown
2323

2424
throw e;
25-
>e : any
25+
>e : unknown
2626
}
2727
finally {
2828
if (a != null && a.toFixed(0) == "123") {
@@ -55,15 +55,15 @@ function f2() {
5555
>1 : 1
5656
}
5757
catch (e) {
58-
>e : any
58+
>e : unknown
5959

6060
x = 2;
6161
>x = 2 : 2
6262
>x : 0 | 1 | 2 | 3
6363
>2 : 2
6464

6565
throw e;
66-
>e : any
66+
>e : unknown
6767
}
6868
finally {
6969
x; // 0 | 1 | 2
@@ -87,7 +87,7 @@ function f3() {
8787
>1 : 1
8888
}
8989
catch (e) {
90-
>e : any
90+
>e : unknown
9191

9292
x = 2;
9393
>x = 2 : 2
@@ -118,7 +118,7 @@ function f4() {
118118
>1 : 1
119119
}
120120
catch (e) {
121-
>e : any
121+
>e : unknown
122122

123123
x = 2;
124124
>x = 2 : 2
@@ -149,7 +149,7 @@ function f5() {
149149
return;
150150
}
151151
catch (e) {
152-
>e : any
152+
>e : unknown
153153

154154
x = 2;
155155
>x = 2 : 2
@@ -178,7 +178,7 @@ function f6() {
178178
>1 : 1
179179
}
180180
catch (e) {
181-
>e : any
181+
>e : unknown
182182

183183
x = 2;
184184
>x = 2 : 2
@@ -211,7 +211,7 @@ function f7() {
211211
return;
212212
}
213213
catch (e) {
214-
>e : any
214+
>e : unknown
215215

216216
x = 2;
217217
>x = 2 : 2
@@ -324,7 +324,7 @@ function f10() {
324324
return;
325325
}
326326
catch (e) {
327-
>e : any
327+
>e : unknown
328328

329329
x = 2;
330330
>x = 2 : 2
@@ -388,7 +388,7 @@ function f11() {
388388
}
389389
}
390390
catch (e) {
391-
>e : any
391+
>e : unknown
392392

393393
x; // 0 | 1 | 2
394394
>x : 0 | 1 | 2
@@ -466,7 +466,7 @@ function f12() {
466466
}
467467
}
468468
catch (e) {
469-
>e : any
469+
>e : unknown
470470

471471
x; // 0 | 1 | 2
472472
>x : 0 | 1 | 2
@@ -576,7 +576,7 @@ function t1() {
576576
>'x' : "x"
577577
}
578578
catch (e) {
579-
>e : any
579+
>e : unknown
580580

581581
return null;
582582
>null : null
@@ -626,7 +626,7 @@ function notallowed(arg: number) {
626626
finally { }
627627
}
628628
catch (err) {
629-
>err : any
629+
>err : unknown
630630

631631
state.tag;
632632
>state.tag : "one" | "two" | "three"
@@ -770,7 +770,7 @@ function f21() {
770770
>x : 3 | 4 | 5
771771
}
772772
catch (e) {
773-
>e : any
773+
>e : unknown
774774

775775
x; // 0 | 1 | 2 | 3 | 4 | 5
776776
>x : 0 | 1 | 2 | 3 | 4 | 5

tests/baselines/reference/tsc/runWithoutArgs/initial-build/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped.js

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ Options:
4848
--noUnusedParameters Report errors on unused parameters.
4949
--noImplicitReturns Report error when not all code paths in function return a value.
5050
--noFallthroughCasesInSwitch Report errors for fallthrough cases in switch statement.
51+
--useUnknownInCatchVariables Type catch clause variables as 'unknown' instead of 'any'.
5152
--types Type declaration files to be included in compilation.
5253
--esModuleInterop Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'.
5354
@<file> Insert command line options and files from a file.

tests/baselines/reference/typedefOnStatements.types

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ throw new Error('Unreachable')
6868
try {
6969
}
7070
catch (e) {
71-
>e : any
71+
>e : unknown
7272
}
7373

7474
/**

0 commit comments

Comments
 (0)