Bun prend nativement en charge l'importation de fichiers .toml.
toml
name = "bun"
version = "1.0.0"
[author]
name = "John Dough"
email = "john@dough.com"Importez le fichier comme n'importe quel autre fichier source.
ts
import data from "./data.toml";
data.name; // => "bun"
data.version; // => "1.0.0"
data.author.name; // => "John Dough"Consultez Docs > Runtime > TypeScript pour plus d'informations sur l'utilisation de TypeScript avec Bun.