Skip to content

Commit 4cb5f3d

Browse files
committed
Remove assertion, use ! instead
1 parent 7d65a8d commit 4cb5f3d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/program.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,9 +1044,7 @@ export class Program extends DiagnosticEmitter {
10441044
// TODO: for (let [alias, name] of globalAliases) {
10451045
for (let _keys = Map_keys(globalAliases), i = 0, k = _keys.length; i < k; ++i) {
10461046
let alias = unchecked(_keys[i]);
1047-
let name = globalAliases.get(alias);
1048-
assert(isString(name));
1049-
name = name!
1047+
let name = changetype<string>(globalAliases.get(alias))!
10501048
if (!name.length) continue; // explicitly disabled
10511049
let firstChar = name.charCodeAt(0);
10521050
if (firstChar >= CharCode._0 && firstChar <= CharCode._9) {

0 commit comments

Comments
 (0)