mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
updated baselines
This commit is contained in:
parent
a4c801d49c
commit
7494134041
@ -0,0 +1,31 @@
|
||||
tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractClinterfaceAssignability.ts(23,1): error TS2322: Type 'typeof A' is not assignable to type 'IConstructor'.
|
||||
Constructor objects of abstract type cannot be assigned to constructor objects of non-abstract type.
|
||||
|
||||
|
||||
==== tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractClinterfaceAssignability.ts (1 errors) ====
|
||||
interface I {
|
||||
x: number;
|
||||
}
|
||||
|
||||
interface IConstructor {
|
||||
new (): I;
|
||||
|
||||
y: number;
|
||||
prototype: I;
|
||||
}
|
||||
|
||||
var I: IConstructor;
|
||||
|
||||
abstract class A {
|
||||
x: number;
|
||||
static y: number;
|
||||
}
|
||||
|
||||
var AA: typeof A;
|
||||
AA = I;
|
||||
|
||||
var AAA: typeof I;
|
||||
AAA = A;
|
||||
~~~
|
||||
!!! error TS2322: Type 'typeof A' is not assignable to type 'IConstructor'.
|
||||
!!! error TS2322: Constructor objects of abstract type cannot be assigned to constructor objects of non-abstract type.
|
||||
@ -0,0 +1,36 @@
|
||||
//// [classAbstractClinterfaceAssignability.ts]
|
||||
interface I {
|
||||
x: number;
|
||||
}
|
||||
|
||||
interface IConstructor {
|
||||
new (): I;
|
||||
|
||||
y: number;
|
||||
prototype: I;
|
||||
}
|
||||
|
||||
var I: IConstructor;
|
||||
|
||||
abstract class A {
|
||||
x: number;
|
||||
static y: number;
|
||||
}
|
||||
|
||||
var AA: typeof A;
|
||||
AA = I;
|
||||
|
||||
var AAA: typeof I;
|
||||
AAA = A;
|
||||
|
||||
//// [classAbstractClinterfaceAssignability.js]
|
||||
var I;
|
||||
var A = (function () {
|
||||
function A() {
|
||||
}
|
||||
return A;
|
||||
})();
|
||||
var AA;
|
||||
AA = I;
|
||||
var AAA;
|
||||
AAA = A;
|
||||
Loading…
x
Reference in New Issue
Block a user