mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Test: extending from any
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
declare var Base: any;
|
||||
class C extends Base {
|
||||
known = 1;
|
||||
static sknown = 2;
|
||||
}
|
||||
|
||||
let c = new C();
|
||||
c.known.length; // error, 'real' has no 'length' property
|
||||
C.sknown.length; // error, 'sreal' has no 'length' property
|
||||
c.unknown.length; // ok, fake: any
|
||||
C.sunknown.length; // ok: sfake: any
|
||||
Reference in New Issue
Block a user