NativeScript / mlkit

Apache License 2.0
24 stars 9 forks source link

MLKitView typing: Hide overriden on-function #31

Closed Acksell closed 1 year ago

Acksell commented 2 years ago

Getting the following error when registering the viewbase using svelte-native:

Types of construct signatures are incompatible.
  Type 'new () => MLKitView' is not assignable to type 'new () => ViewBase'.
    Construct signature return types 'MLKitView' and 'ViewBase' are incompatible.
      The types of 'on' are incompatible between these types.
        Type '(event: "detection", callback: (args: DetectionEvent) => void, thisArg?: any) => any' is not assignable to type '{ (eventNames: string, callback: (data: EventData) => void, thisArg?: any): any; (event: "propertyChange", callback: (data: EventData) => void, thisArg?: any): any; }'.
          Types of parameters 'event' and 'event' are incompatible.
            Type '"propertyChange"' is not assignable to type '"detection"'. ts(2419)

image

Resolved by adding @hidden directive for the overridden on-function.

cla-bot[bot] commented 2 years ago

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign the CLA at https://www.nativescript.org/cla. CLA has not been signed by users: @Acksell. After signing the CLA, you can ask me to recheck this PR by posting @cla-bot check as a comment to the PR.

Acksell commented 2 years ago

@cla-bot check

cla-bot[bot] commented 2 years ago

The cla-bot has been summoned, and re-checked this pull request!