mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 04:43:37 -05:00
Fix for issue #442
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
// @target: es5
|
||||
|
||||
// static name
|
||||
class A {
|
||||
static name: number; // error
|
||||
name: string; // ok
|
||||
}
|
||||
|
||||
class B {
|
||||
static name() {} // error
|
||||
name() {} // ok
|
||||
}
|
||||
|
||||
|
||||
|
||||
// static length...
|
||||
class C {
|
||||
static length: number; // error
|
||||
length: string; // ok
|
||||
}
|
||||
|
||||
class D {
|
||||
static length() {} // error
|
||||
length() {} // ok
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
// @target: es6
|
||||
|
||||
|
||||
// static name
|
||||
class A {
|
||||
static name: string; // ok
|
||||
name: string; // ok
|
||||
}
|
||||
|
||||
class B {
|
||||
static name() {}; // ok
|
||||
name() {}; // ok
|
||||
}
|
||||
|
||||
|
||||
// static length
|
||||
class C {
|
||||
static length: number; // ok
|
||||
length: string; // ok
|
||||
}
|
||||
|
||||
class D {
|
||||
static length() {} // ok
|
||||
length() {} // ok
|
||||
}
|
||||
Reference in New Issue
Block a user