File tree Expand file tree Collapse file tree 3 files changed +103
-0
lines changed
Expand file tree Collapse file tree 3 files changed +103
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "dependencies": {}
3+ }
4+ //bun.lock
5+ <empty>
Original file line number Diff line number Diff line change 1+ summary : ' '
2+ description : ' '
3+ lock : ' !inline f/user/happy_script.script.lock'
4+ kind : script
5+ schema :
6+ $schema : ' https://json-schema.org/draft/2020-12/schema'
7+ type : object
8+ properties :
9+ a :
10+ type : number
11+ description : ' '
12+ default : null
13+ b :
14+ type : string
15+ description : ' '
16+ default : null
17+ enum :
18+ - my
19+ - enum
20+ originalType : enum
21+ e :
22+ type : string
23+ description : ' '
24+ default : inferred type string from default arg
25+ originalType : string
26+ f :
27+ type : object
28+ description : ' '
29+ default :
30+ nested : object
31+ properties :
32+ nested :
33+ type : string
34+ description : ' '
35+ originalType : string
36+ g :
37+ type : object
38+ description : ' '
39+ default : null
40+ oneOf :
41+ - type : object
42+ properties :
43+ foo :
44+ type : string
45+ description : ' '
46+ originalType : string
47+ label :
48+ type : string
49+ description : ' '
50+ enum :
51+ - Variant 1
52+ originalType : enum
53+ title : Variant 1
54+ - type : object
55+ properties :
56+ bar :
57+ type : number
58+ description : ' '
59+ label :
60+ type : string
61+ description : ' '
62+ enum :
63+ - Variant 2
64+ originalType : enum
65+ title : Variant 2
66+ required :
67+ - a
68+ - b
69+ - g
Original file line number Diff line number Diff line change 1+ // there are multiple modes to add as header: //nobundling //native //npm //nodejs
2+ // https://www.windmill.dev/docs/getting_started/scripts_quickstart/typescript#modes
3+
4+ // import { toWords } from "number-to-words@1"
5+ import * as wmill from "windmill-client"
6+
7+ // fill the type, or use the +Resource type to get a type-safe reference to a resource
8+ // type Postgresql = object
9+
10+
11+ export async function main (
12+ a : number ,
13+ b : "my" | "enum" ,
14+ //c: Postgresql,
15+ //d: wmill.S3Object, // https://www.windmill.dev/docs/core_concepts/persistent_storage/large_data_files
16+ //d: DynSelect_foo, // https://www.windmill.dev/docs/core_concepts/json_schema_and_parsing#dynamic-select
17+ e = "inferred type string from default arg" ,
18+ f = { nested : "object" } ,
19+ g : {
20+ label : "Variant 1" ,
21+ foo : string
22+ } | {
23+ label : "Variant 2" ,
24+ bar : number
25+ }
26+ ) {
27+ // let x = await wmill.getVariable('u/user/foo')
28+ return { foo : a } ;
29+ }
You can’t perform that action at this time.
0 commit comments