Nouveau Papier Mâché

    tsd-extract
    TypeScript icon, indicating that this package has built-in type declarations

    0.8.7 • Public • Published

    tsd-extract

    Extract any definition from TS definitions file string

    page on codsen.com page on npm page on github Downloads per month changelog MIT Licence

    Install

    This package is pure ESM. If you're not ready yet, use a non-ESM alternative, tsd-extract-noesm.

    npm i tsd-extract

    Quick Take

    import { strict as assert } from "assert";
    import { extract } from "tsd-extract";
    
    const { value } = extract(
      `interface Opts1 { foo: boolean };
    interface Opts2 { bar: boolean };`,
      "Opts2"
    );
    
    assert.equal(value, "interface Opts2 { bar: boolean };");

    Documentation

    Please visit codsen.com for a full description of the API.

    Contributing

    To report bugs or request features or assistance, raise an issue on GitHub.

    Licence

    MIT License.

    Copyright © 2010-2022 Roy Revelt and other contributors.

    ok codsen star

    Install

    npm i tsd-extract

    DownloadsWeekly Downloads

    112

    Version

    0.8.7

    License

    MIT

    Unpacked Size

    36 kB

    Total Files

    7

    Last publish

    Collaborators

    • royston