@atscript/core 0.1.19 → 0.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +18 -0
- package/dist/index.mjs +18 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3280,6 +3280,24 @@ const metaAnnotations = {
|
|
|
3280
3280
|
description: "Optional error message to display if the validation fails."
|
|
3281
3281
|
}]
|
|
3282
3282
|
}),
|
|
3283
|
+
default: new AnnotationSpec({
|
|
3284
|
+
description: "Defines a **default value** for a property or type. For string fields the value is used as-is; for other types it is parsed as JSON.\n\n**Example:**```atscript@meta.default \"unknown\"name: string\n@meta.default \"0\"count: number\n@meta.default '{\"street\":\"\",\"city\":\"\"}'address: Address```",
|
|
3285
|
+
nodeType: ["prop", "type"],
|
|
3286
|
+
argument: {
|
|
3287
|
+
name: "value",
|
|
3288
|
+
type: "string",
|
|
3289
|
+
description: "The default value. Strings are used as-is; other types are parsed as JSON."
|
|
3290
|
+
}
|
|
3291
|
+
}),
|
|
3292
|
+
example: new AnnotationSpec({
|
|
3293
|
+
description: "Defines an **example value** for a property or type, useful for documentation and data generation. For string fields the value is used as-is; for other types it is parsed as JSON.\n\n**Example:**```atscript@meta.example \"John Doe\"name: string\n@meta.example \"42\"age: number\n@meta.example '[\"admin\",\"user\"]'roles: string[]```",
|
|
3294
|
+
nodeType: ["prop", "type"],
|
|
3295
|
+
argument: {
|
|
3296
|
+
name: "value",
|
|
3297
|
+
type: "string",
|
|
3298
|
+
description: "The example value. Strings are used as-is; other types are parsed as JSON."
|
|
3299
|
+
}
|
|
3300
|
+
}),
|
|
3283
3301
|
isKey: new AnnotationSpec({
|
|
3284
3302
|
description: "Marks a **key field** inside an array. This annotation is used to identify unique fields within an array that can be used as **lookup keys**.\n\n\n\n**Example:**\n```atscript\nexport interface User {\n id: string\n profiles: {\n @meta.isKey\n profileId: string\n name: string\n }[]\n}\n```\n",
|
|
3285
3303
|
nodeType: ["prop", "type"],
|
package/dist/index.mjs
CHANGED
|
@@ -3256,6 +3256,24 @@ const metaAnnotations = {
|
|
|
3256
3256
|
description: "Optional error message to display if the validation fails."
|
|
3257
3257
|
}]
|
|
3258
3258
|
}),
|
|
3259
|
+
default: new AnnotationSpec({
|
|
3260
|
+
description: "Defines a **default value** for a property or type. For string fields the value is used as-is; for other types it is parsed as JSON.\n\n**Example:**```atscript@meta.default \"unknown\"name: string\n@meta.default \"0\"count: number\n@meta.default '{\"street\":\"\",\"city\":\"\"}'address: Address```",
|
|
3261
|
+
nodeType: ["prop", "type"],
|
|
3262
|
+
argument: {
|
|
3263
|
+
name: "value",
|
|
3264
|
+
type: "string",
|
|
3265
|
+
description: "The default value. Strings are used as-is; other types are parsed as JSON."
|
|
3266
|
+
}
|
|
3267
|
+
}),
|
|
3268
|
+
example: new AnnotationSpec({
|
|
3269
|
+
description: "Defines an **example value** for a property or type, useful for documentation and data generation. For string fields the value is used as-is; for other types it is parsed as JSON.\n\n**Example:**```atscript@meta.example \"John Doe\"name: string\n@meta.example \"42\"age: number\n@meta.example '[\"admin\",\"user\"]'roles: string[]```",
|
|
3270
|
+
nodeType: ["prop", "type"],
|
|
3271
|
+
argument: {
|
|
3272
|
+
name: "value",
|
|
3273
|
+
type: "string",
|
|
3274
|
+
description: "The example value. Strings are used as-is; other types are parsed as JSON."
|
|
3275
|
+
}
|
|
3276
|
+
}),
|
|
3259
3277
|
isKey: new AnnotationSpec({
|
|
3260
3278
|
description: "Marks a **key field** inside an array. This annotation is used to identify unique fields within an array that can be used as **lookup keys**.\n\n\n\n**Example:**\n```atscript\nexport interface User {\n id: string\n profiles: {\n @meta.isKey\n profileId: string\n name: string\n }[]\n}\n```\n",
|
|
3261
3279
|
nodeType: ["prop", "type"],
|