remove prototype def and make param optional

This commit is contained in:
Aaron Holderman 2018-09-26 15:18:15 -06:00
parent 9d4aa5c00e
commit f47826178d
2 changed files with 4 additions and 6 deletions

View File

@ -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: [

View File

@ -2,7 +2,7 @@
// Project: https://github.com/apostrophecms/apostrophe#readme
// Definitions by: Aaron Holderman <https://github.com/afholderman>
// 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<C> {
interface AposModuleOptions<C = {}> {
extend: AposCoreModules | C;
name?: string;
label: string;