@astrale-os/sdk 0.5.0-beta.140 → 0.5.0-beta.141
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.
|
@@ -4,6 +4,8 @@ export { defineSchema } from './schema-authoring.js';
|
|
|
4
4
|
export type { AuthoredSchema, AuthoredDomain } from './schema-authoring.js';
|
|
5
5
|
export { stateProperty } from './state-property.js';
|
|
6
6
|
export type { StateProperty } from './state-property.js';
|
|
7
|
+
export { property } from './property.js';
|
|
8
|
+
export type { AuthoredProperty, PropertyOptions } from './property.js';
|
|
7
9
|
export { patterns } from '@astrale-os/kernel-dsl/v1/addressing';
|
|
8
10
|
export { defineClass, nodeClass } from './class-authoring.js';
|
|
9
11
|
export type { AuthoredNodeClass, NodeClassInput } from './class-authoring.js';
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
export * from '@astrale-os/kernel-dsl/v1';
|
|
3
3
|
export { defineSchema } from './schema-authoring.js';
|
|
4
4
|
export { stateProperty } from './state-property.js';
|
|
5
|
+
export { property } from './property.js';
|
|
5
6
|
export { patterns } from '@astrale-os/kernel-dsl/v1/addressing';
|
|
6
7
|
export { defineClass, nodeClass } from './class-authoring.js';
|
|
7
8
|
export { error } from './error.js';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { property as canonicalProperty, type ValueSchemaInput } from '@astrale-os/kernel-dsl/v1/builder';
|
|
2
|
+
/** Stable SDK-owned options for ordinary Schema properties. */
|
|
3
|
+
export interface PropertyOptions {
|
|
4
|
+
readonly required?: boolean;
|
|
5
|
+
readonly description?: string;
|
|
6
|
+
}
|
|
7
|
+
/** Portable public property handle whose inferred type remains owned by the SDK facade. */
|
|
8
|
+
export interface AuthoredProperty<Schema extends ValueSchemaInput, Options extends PropertyOptions = Record<never, never>> extends ReturnType<typeof canonicalProperty<Schema, Options>> {
|
|
9
|
+
}
|
|
10
|
+
/** Canonical property authoring with a portable inferred return type. */
|
|
11
|
+
export declare const property: <const Schema extends ValueSchemaInput, const Options extends PropertyOptions = Record<never, never>>(schema: Schema, options?: Options) => AuthoredProperty<Schema, {
|
|
12
|
+
[Key in keyof Options]: Options[Key];
|
|
13
|
+
}>;
|