From df95acf5985066b0cf155e4bb4cae50af9e7debf Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Sun, 28 Jul 2024 14:31:23 +0200 Subject: [PATCH] clarify //nobundling --- frontend/src/lib/script_helpers.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/frontend/src/lib/script_helpers.ts b/frontend/src/lib/script_helpers.ts index 64c1727da6..a30a99913c 100644 --- a/frontend/src/lib/script_helpers.ts +++ b/frontend/src/lib/script_helpers.ts @@ -57,17 +57,22 @@ export async function main( } ` -export const BUN_INIT_CODE = `// import { toWords } from "number-to-words@1" +export const BUN_INIT_CODE = `// there are multiple modes to add as header: //nobundling //native //npm //nodejs +// https://www.windmill.dev/docs/getting_started/scripts_quickstart/typescript#modes + +// import { toWords } from "number-to-words@1" import * as wmill from "windmill-client" // fill the type, or use the +Resource type to get a type-safe reference to a resource // type Postgresql = object + export async function main( a: number, b: "my" | "enum", //c: Postgresql, - //d: wmill.S3Object, // for large files backed by S3 (https://www.windmill.dev/docs/core_concepts/persistent_storage/large_data_files) + //d: wmill.S3Object, // https://www.windmill.dev/docs/core_concepts/persistent_storage/large_data_files + //d: DynSelect_foo, // https://www.windmill.dev/docs/core_concepts/json_schema_and_parsing#dynamic-select e = "inferred type string from default arg", f = { nested: "object" }, g: {