Skip to content

Update return type of requireNodeAddon #265

@kraenhansen

Description

@kraenhansen

This function is currently typed to return void, which is not expected.

requireNodeAddon(libraryName: string): void;

Instead it should take a generic type parameter extending (and defaulting to) unknown.

Since we're no longer relying on codegen, we can also loose the extends TurboModule and the type import above:

export interface Spec extends TurboModule {

Metadata

Metadata

Assignees

No one assigned

    Labels

    Host 🏡Our `react-native-node-api-modules` packagegood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions