37 lines
682 B
Plaintext
37 lines
682 B
Plaintext
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
exports[`declare_class.js 1`] = `
|
|
declare class C {
|
|
static x: number;
|
|
static foo(x: number): void;
|
|
|
|
constructor(x: string): void;
|
|
}
|
|
|
|
C.x = "";
|
|
C.foo("");
|
|
|
|
(C.name: string);
|
|
(C.name: number); // error, it's a string
|
|
|
|
declare class D extends C { }
|
|
new D(123); // error, number ~> string
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
declare class C {
|
|
static x: number;
|
|
static foo(x: number): void;
|
|
|
|
constructor(x: string): void;
|
|
}
|
|
|
|
C.x = "";
|
|
C.foo("");
|
|
|
|
(C.name: string);
|
|
(C.name: number); // error, it's a string
|
|
|
|
declare class D extends C {}
|
|
new D(123); // error, number ~> string
|
|
|
|
`;
|