tsd-extract
v0.10.7
Published
Extract any definition from TS definitions file string
Downloads
737
Maintainers
Readme
No 3rd party dependencies. All dependencies, checked recursively, are Codsen packages.
Install
This package is pure ESM. If you're not ready yet, use a non-ESM alternative, tsd-extract-noesm.
npm i tsd-extractQuick Take
import { strict as assert } from "node: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. For Changelog, see raw md on GitHub or the website.
Contributing
To report bugs or request features or assistance, raise an issue on GitHub.
Licence
MIT License
Copyright © 2010-2026 Roy Revelt and other contributors
