mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
33 lines
773 B
Plaintext
33 lines
773 B
Plaintext
controlFlowAliasingCatchVariables.ts(20,9): error TS18046: 'e' is of type 'unknown'.
|
|
|
|
|
|
==== controlFlowAliasingCatchVariables.ts (1 errors) ====
|
|
try {}
|
|
catch (e) {
|
|
const isString = typeof e === 'string';
|
|
if (isString) {
|
|
e.toUpperCase(); // e string
|
|
}
|
|
|
|
if (typeof e === 'string') {
|
|
e.toUpperCase(); // e string
|
|
}
|
|
}
|
|
|
|
try {}
|
|
catch (e) {
|
|
const isString = typeof e === 'string';
|
|
|
|
e = 1;
|
|
|
|
if (isString) {
|
|
e.toUpperCase(); // e any/unknown
|
|
~
|
|
!!! error TS18046: 'e' is of type 'unknown'.
|
|
}
|
|
|
|
if (typeof e === 'string') {
|
|
e.toUpperCase(); // e string
|
|
}
|
|
}
|
|
|