Skip to content

Commit a043fe0

Browse files
Copilothotlong
andcommitted
Fix code review feedback: remove redundant imports and declarations in base.ts
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 226b200 commit a043fe0

1 file changed

Lines changed: 3 additions & 15 deletions

File tree

packages/types/src/base.ts

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* @packageDocumentation
1717
*/
1818

19-
import type { UIComponent, SchemaNode as SpecSchemaNode } from '@objectstack/spec';
19+
import type { UIComponent } from '@objectstack/spec';
2020

2121
/**
2222
* Base schema interface that all component schemas extend.
@@ -38,19 +38,6 @@ import type { UIComponent, SchemaNode as SpecSchemaNode } from '@objectstack/spe
3838
* ```
3939
*/
4040
export interface BaseSchema extends UIComponent {
41-
/**
42-
* Component type identifier. Determines which renderer to use.
43-
* Inherited from UIComponent but documented here for clarity.
44-
* @example 'input', 'button', 'form', 'grid'
45-
*/
46-
type: string;
47-
48-
/**
49-
* Unique identifier for the component instance.
50-
* Used for state management, event handling, and React keys.
51-
*/
52-
id?: string;
53-
5441
/**
5542
* Human-readable name for the component.
5643
* Used for form field names, labels, and debugging.
@@ -170,7 +157,8 @@ export interface BaseSchema extends UIComponent {
170157
* A schema node can be a full schema object or a primitive value.
171158
* This union type supports both structured components and simple content.
172159
*
173-
* Re-exported from @objectstack/spec for convenience.
160+
* Note: This uses BaseSchema (instead of UIComponent from spec) to provide
161+
* ObjectUI-specific type narrowing and to include ObjectUI extensions in the type system.
174162
*
175163
* @example
176164
* ```typescript

0 commit comments

Comments
 (0)