mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-02-03 23:42:50 +00:00
Declare enableFeature (#29927)
* Declare `enableFeature` * Add missing newline Co-Authored-By: zeppelin <gabor.babicz@gmail.com>
This commit is contained in:
parent
434800bc66
commit
6e675310cc
@ -1,5 +1,6 @@
|
||||
import Features from 'ember-feature-flags';
|
||||
import 'ember-feature-flags/tests/helpers/with-feature';
|
||||
import 'ember-feature-flags/test-support';
|
||||
|
||||
/** Static assertion that `value` has type `T` */
|
||||
// Disable tslint here b/c the generic is used to let us do a type coercion and
|
||||
@ -24,4 +25,5 @@ const setup = {
|
||||
};
|
||||
features.setup(setup); // $ExpectType void
|
||||
withFeature('new-homepage'); // $ExpectType void
|
||||
enableFeature('new-homepage'); // $ExpectType void
|
||||
assertType<boolean>(features.get('someFeature'));
|
||||
|
||||
1
types/ember-feature-flags/test-support/index.d.ts
vendored
Normal file
1
types/ember-feature-flags/test-support/index.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
||||
declare function enableFeature(name: string): void;
|
||||
@ -47,6 +47,7 @@
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"tests/helpers/with-feature.d.ts",
|
||||
"test-support/index.d.ts",
|
||||
"ember-feature-flags-tests.ts"
|
||||
]
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user