tsd-extract
v0.9.3
Published
Extract any definition from TS definitions file string
Downloads
168
Maintainers
Readme
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 "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. If you’re looking for the Changelog, it’s here.
Contributing
To report bugs or request features or assistance, raise an issue on GitHub.
Licence
MIT License
Copyright © 2010-2025 Roy Revelt and other contributors
