Skip to content

MLKitView typing: Hide overriden on-function #31

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 2 commits into from
Jul 20, 2022

Conversation

Acksell
Copy link
Contributor

@Acksell Acksell commented Jul 16, 2022

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
Copy link

cla-bot bot commented Jul 16, 2022

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
Copy link
Contributor Author

Acksell commented Jul 16, 2022

@cla-bot check

@cla-bot cla-bot bot added the cla: yes label Jul 16, 2022
@cla-bot
Copy link

cla-bot bot commented Jul 16, 2022

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

@triniwiz triniwiz merged commit c8a0d24 into NativeScript:main Jul 20, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants