Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

fix: pass in generic types and export Specs #136

Merged
merged 6 commits into from
Sep 16, 2024

Conversation

itsramiel
Copy link
Contributor

Summary

The nitrogen page is a step by step guide on running Nitro Codegen but following as it is now leads user to errors.

When defining the Spec, HybridObject requires a generic parameter or else the user would get:

        ❌  Failed to generate spec for RNFilePicker! Error: RNFilePicker does not properly extend HybridObject<T> - HybridObject does not have a single generic type argument for platform spec languages.
    ❌  No specs found in RNFilePicker.nitro.ts!

So this pr adds the generic type for guide completeness and exports the Spec since it is used in step 6 which I also made obvious in that step that this is the spec defined in .nitro.ts file.

Also the classes are missing the memorySize and hybridContext(for ios) for completeness. I copy pasted them, only to get a cryptic error in the console till i opened xcode. C++ needs to be updated too for memorySize? Not sure

Copy link
Owner

@mrousavy mrousavy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, but I have a few suggestions to keep it a bit cleaner - less text is more readable.

docs/docs/nitrogen.md Outdated Show resolved Hide resolved
docs/docs/nitrogen.md Outdated Show resolved Hide resolved
docs/docs/nitrogen.md Outdated Show resolved Hide resolved
@mrousavy mrousavy merged commit 97f36fd into mrousavy:main Sep 16, 2024
1 check passed
@itsramiel itsramiel deleted the fix/doc-fixes branch September 16, 2024 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants