Skip to content

Add note on External regarding interface files #159

Closed
@ryyppy

Description

@ryyppy

When writing externals for JS code, it is rather easy to unintentionally introduce extra code by not using the same external in the interface (.resi) file. Therefore, whenever you are exposing an external, you need to make sure to copy the same external to your interface file to guarantee zero-cost bindings.

We previously had a note in the old docs that state

Note: do also use externals and the [@bs.blabla] attributes in the interface files. Otherwise the inlining won't happen.

This is an important note, so it should be added back to the External page.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions