Skip to content

Commit

Permalink
fix: fix adapter typing
Browse files Browse the repository at this point in the history
  • Loading branch information
Tidyzq committed Jan 22, 2024
1 parent f320d72 commit 21d2995
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion glass-easel-miniprogram-adapter/src/builder/type_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export interface BuilderContext<
TMethodCaller,
> extends ThisType<TMethodCaller> {
self: TMethodCaller
data: typeUtils.DataWithPropertyValues<TPrevData, TProperty>
data: typeUtils.Merge<typeUtils.DataWithPropertyValues<TPrevData, TProperty>>
setData: (newData: Partial<typeUtils.SetDataSetter<TPrevData>>, callback?: () => void) => void
implement: <TIn extends { [x: string]: any }>(
traitBehavior: TraitBehavior<TIn, any>,
Expand Down
4 changes: 2 additions & 2 deletions glass-easel-miniprogram-adapter/src/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export class ComponentCaller<
}

/** The component data and property values */
get data(): AllData<TData, TProperty> {
get data(): typeUtils.Merge<AllData<TData, TProperty>> {
return this._$.data
}
set data(value: AllData<TData, TProperty>) {
Expand All @@ -144,7 +144,7 @@ export class ComponentCaller<
}

/** The component data and property values (same as `data` ) */
get properties(): AllData<TData, TProperty> {
get properties(): typeUtils.Merge<AllData<TData, TProperty>> {
return this._$.data
}
set properties(value: AllData<TData, TProperty>) {
Expand Down

0 comments on commit 21d2995

Please sign in to comment.