Skip to content

Commit 85813b8

Browse files
committed
Revert "Add new bad test case for classes"
This reverts commit d9c2877.
1 parent d9c2877 commit 85813b8

4 files changed

+0
-78
lines changed

tests/baselines/reference/declarationEmitGlobalThisPreserved.js

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -104,16 +104,6 @@ export class AsClassProperty {
104104

105105
export type AsFunctionType = (isNaN: typeof globalThis.isNaN) => typeof globalThis.isNaN;
106106

107-
108-
export const aClass = class Foo<isNaN> {
109-
method1(): isNaN {
110-
return undefined as any;
111-
}
112-
113-
method2(): typeof globalThis.isNaN {
114-
return globalThis.isNaN
115-
}
116-
}
117107

118108

119109

@@ -178,9 +168,3 @@ export declare class AsClassProperty {
178168
isNaN?: typeof globalThis.isNaN;
179169
}
180170
export type AsFunctionType = (isNaN: typeof globalThis.isNaN) => typeof globalThis.isNaN;
181-
export declare const aClass: {
182-
new <isNaN>(): {
183-
method1(): isNaN;
184-
method2(): typeof isNaN;
185-
};
186-
};

tests/baselines/reference/declarationEmitGlobalThisPreserved.symbols

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -500,29 +500,3 @@ export type AsFunctionType = (isNaN: typeof globalThis.isNaN) => typeof globalTh
500500
>isNaN : Symbol(isNaN, Decl(lib.es5.d.ts, --, --))
501501

502502

503-
export const aClass = class Foo<isNaN> {
504-
>aClass : Symbol(aClass, Decl(declarationEmitGlobalThisPreserved.ts, 106, 12))
505-
>Foo : Symbol(Foo, Decl(declarationEmitGlobalThisPreserved.ts, 106, 21))
506-
>isNaN : Symbol(isNaN, Decl(declarationEmitGlobalThisPreserved.ts, 106, 32))
507-
508-
method1(): isNaN {
509-
>method1 : Symbol(Foo.method1, Decl(declarationEmitGlobalThisPreserved.ts, 106, 40))
510-
>isNaN : Symbol(isNaN, Decl(declarationEmitGlobalThisPreserved.ts, 106, 32))
511-
512-
return undefined as any;
513-
>undefined : Symbol(undefined)
514-
}
515-
516-
method2(): typeof globalThis.isNaN {
517-
>method2 : Symbol(Foo.method2, Decl(declarationEmitGlobalThisPreserved.ts, 109, 5))
518-
>globalThis.isNaN : Symbol(isNaN, Decl(lib.es5.d.ts, --, --))
519-
>globalThis : Symbol(globalThis)
520-
>isNaN : Symbol(isNaN, Decl(lib.es5.d.ts, --, --))
521-
522-
return globalThis.isNaN
523-
>globalThis.isNaN : Symbol(isNaN, Decl(lib.es5.d.ts, --, --))
524-
>globalThis : Symbol(globalThis)
525-
>isNaN : Symbol(isNaN, Decl(lib.es5.d.ts, --, --))
526-
}
527-
}
528-

tests/baselines/reference/declarationEmitGlobalThisPreserved.types

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -522,29 +522,3 @@ export type AsFunctionType = (isNaN: typeof globalThis.isNaN) => typeof globalTh
522522
>isNaN : (number: number) => boolean
523523

524524

525-
export const aClass = class Foo<isNaN> {
526-
>aClass : typeof Foo
527-
>class Foo<isNaN> { method1(): isNaN { return undefined as any; } method2(): typeof globalThis.isNaN { return globalThis.isNaN }} : typeof Foo
528-
>Foo : typeof Foo
529-
530-
method1(): isNaN {
531-
>method1 : () => isNaN
532-
533-
return undefined as any;
534-
>undefined as any : any
535-
>undefined : undefined
536-
}
537-
538-
method2(): typeof globalThis.isNaN {
539-
>method2 : () => typeof globalThis.isNaN
540-
>globalThis.isNaN : (number: number) => boolean
541-
>globalThis : typeof globalThis
542-
>isNaN : (number: number) => boolean
543-
544-
return globalThis.isNaN
545-
>globalThis.isNaN : (number: number) => boolean
546-
>globalThis : typeof globalThis
547-
>isNaN : (number: number) => boolean
548-
}
549-
}
550-

tests/cases/compiler/declarationEmitGlobalThisPreserved.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,3 @@ export class AsClassProperty {
106106

107107
export type AsFunctionType = (isNaN: typeof globalThis.isNaN) => typeof globalThis.isNaN;
108108

109-
110-
export const aClass = class Foo<isNaN> {
111-
method1(): isNaN {
112-
return undefined as any;
113-
}
114-
115-
method2(): typeof globalThis.isNaN {
116-
return globalThis.isNaN
117-
}
118-
}

0 commit comments

Comments
 (0)