Skip to content

Document "@as(jsonxxx)" #550

Closed
Closed
@cristianoc

Description

@cristianoc

Looks like this is missing in the documentation.

@module("library-x") @val
external doStuff: (@as(json`{format:"utf8", includeStuff: false}`) _, string) => string = "doStuff"


let fileContents = doStuff("somefilename.txt")
// Compiles to:
// var fileContents = LibraryX.doStuff({format:"utf8", includeStuff: false}, "somefilename.txt");

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions