From aa115293b8dd2540fd3a4b6871b68375840c007a Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 30 Jul 2018 11:00:29 -0700 Subject: [PATCH] Make `Props` default to `never` in 'moonjs'. (#27667) * Make `Props` default to `never` in 'moonjs'. * Update test for missing props. --- types/moonjs/index.d.ts | 4 ++-- types/moonjs/moonjs-tests.ts | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/types/moonjs/index.d.ts b/types/moonjs/index.d.ts index 13dcbbe04e..c003f7ad58 100644 --- a/types/moonjs/index.d.ts +++ b/types/moonjs/index.d.ts @@ -22,11 +22,11 @@ declare namespace Moon { } interface MoonConstructor { - new (options?: ConstructorOptions): Instance>; + new (options?: ConstructorOptions): Instance>; } interface MoonStatic extends MoonConstructor { - component(name: string, options: ComponentOptions): MoonConstructor; + component(name: string, options: ComponentOptions): MoonConstructor; config: MoonConfig; use(plugin: object): void; compile(template: string): void; diff --git a/types/moonjs/moonjs-tests.ts b/types/moonjs/moonjs-tests.ts index aa6527ea82..34d1d8d359 100644 --- a/types/moonjs/moonjs-tests.ts +++ b/types/moonjs/moonjs-tests.ts @@ -17,6 +17,7 @@ const count = app.get("count"); count; // $ExpectType number app.get("increment")(); // $ExpectType void app.callMethod("increment"); // $ExpectType any +app.get("blahblahblah"); // $ExpectError app.destroy();