mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
Add Bun.TOML to types (#6161)
This commit is contained in:
13
packages/bun-types/bun.d.ts
vendored
13
packages/bun-types/bun.d.ts
vendored
@@ -70,6 +70,19 @@ declare module "bun" {
|
||||
options?: { PATH?: string; cwd?: string },
|
||||
): string | null;
|
||||
|
||||
interface TOML {
|
||||
/**
|
||||
* Parse a TOML string into a JavaScript object.
|
||||
*
|
||||
* @param {string} command The name of the executable or script
|
||||
* @param {string} options.PATH Overrides the PATH environment variable
|
||||
* @param {string} options.cwd Limits the search to a particular directory in which to searc
|
||||
*
|
||||
*/
|
||||
parse(input: string): object;
|
||||
}
|
||||
export const TOML: TOML;
|
||||
|
||||
export type Serve<WebSocketDataType = undefined> =
|
||||
| ServeOptions
|
||||
| TLSServeOptions
|
||||
|
||||
@@ -41,3 +41,6 @@ import * as tsd from "tsd";
|
||||
env: { ...process.env, dummy: "" },
|
||||
});
|
||||
}
|
||||
{
|
||||
Bun.TOML.parse("asdf = asdf");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user