From f47826178d295b49e7e2f00b0776f65f981eb48d Mon Sep 17 00:00:00 2001 From: Aaron Holderman Date: Wed, 26 Sep 2018 15:18:15 -0600 Subject: [PATCH] remove prototype def and make param optional --- types/apostrophe/apostrophe-tests.ts | 4 ++-- types/apostrophe/index.d.ts | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/types/apostrophe/apostrophe-tests.ts b/types/apostrophe/apostrophe-tests.ts index c1fe51c22e..982160f274 100644 --- a/types/apostrophe/apostrophe-tests.ts +++ b/types/apostrophe/apostrophe-tests.ts @@ -1,8 +1,8 @@ import { AposModuleOptions } from "apostrophe"; -type CustomModules = "first-custom-widgets" | "second-custom-widgets"; +type CustomModules = "first-custom-widgets"; -const firstCustomWidgetOptions: AposModuleOptions<{}> = { +const firstCustomWidgetOptions: AposModuleOptions = { extend: "apostrophe-widgets", label: "First Custom Widget", addFields: [ diff --git a/types/apostrophe/index.d.ts b/types/apostrophe/index.d.ts index be0a4fce52..bab1b3a7de 100644 --- a/types/apostrophe/index.d.ts +++ b/types/apostrophe/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/apostrophecms/apostrophe#readme // Definitions by: Aaron Holderman // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.2 +// TypeScript Version: 2.3 export = apostrophe; export as namespace apos; @@ -15,8 +15,6 @@ declare namespace apostrophe { modules: string[]; }; - const prototype: {}; - const ui: { globalBusy: (state: any) => any; link: ( @@ -278,7 +276,7 @@ declare namespace apostrophe { | "apostrophe-widgets"; // Pass in custom modules to AposModuleOptions to allow them in extend - interface AposModuleOptions { + interface AposModuleOptions { extend: AposCoreModules | C; name?: string; label: string;