homebridge / plugin-ui-utils

Create fully customisable configuration user interfaces for Homebridge plugins.
https://homebridge.io
MIT License
34 stars 7 forks source link

latest <- beta #21

Open bwp91 opened 3 months ago

bwp91 commented 3 months ago

note!! there are currently ts build issues:

> @homebridge/plugin-ui-utils@1.0.3 build
> rimraf ./dist && tsc --project tsconfig.json && tsc --project tsconfig.ui.json

src/ui.mock.ts:75:10 - error TS2416: Property 'createForm' in type 'MockHomebridgePluginUi' is not assignable to the same property in base type 'IHomebridgePluginUi'.
  Type '(schema: any, data: any) => MockHomebridgeUiFormHelper' is not assignable to type '(schema: PluginFormSchema, data: any, submitButton?: string | undefined, cancelButton?: string | undefined) => IHomebridgeUiFormHelper'.
    Type 'MockHomebridgeUiFormHelper' is not assignable to type 'IHomebridgeUiFormHelper'.

75   public createForm(schema, data) {
            ~~~~~~~~~~

src/ui.mock.ts:76:43 - error TS2345: Argument of type 'this' is not assignable to parameter of type 'IHomebridgePluginUi'.
  Type 'MockHomebridgePluginUi' is not assignable to type 'IHomebridgePluginUi'.
    The types returned by 'createForm(...)' are incompatible between these types.
      Type 'MockHomebridgeUiFormHelper' is missing the following properties from type 'IHomebridgeUiFormHelper': onSubmit, onCancel

76     return new MockHomebridgeUiFormHelper(this, schema, data);
                                             ~~~~

Found 2 errors in the same file, starting at: src/ui.mock.ts:75