This commit is contained in:
Mike North
2018-09-02 12:24:24 -07:00
parent 50599f24b8
commit 121bbc2975
2 changed files with 21 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
import Ember from 'ember';
import { assertType } from './lib/assert';
class Foo extends Ember.Object {
hello() { return 'world'; }
protected bar() { return 'bar'; }
private baz() { return 'baz'; }
}
const f = new Foo();
assertType<string>(f.hello());
assertType<string>(f.bar()); // $ExpectError
assertType<string>(f.baz()); // $ExpectError
class Foo2 extends Ember.Object.extend({
bar: ''
}) {
hello() { return 'world'; }
protected bar() { return 'bar'; } // $ExpectError
private baz() { return 'baz'; }
}
+1
View File
@@ -22,6 +22,7 @@
"index.d.ts",
"test/lib/assert.ts",
"test/application.ts",
"test/access-modifier.ts",
"test/application-instance.ts",
"test/engine-instance.ts",
"test/ember-tests.ts",