Skip to content

Commit

Permalink
fix(uut)!: remove UniSearchBarOnInputEvent, update UniSearchBarOnInpu…
Browse files Browse the repository at this point in the history
…t types
  • Loading branch information
ModyQyW committed Sep 10, 2024
1 parent d743dd0 commit 2e32d7f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
6 changes: 1 addition & 5 deletions packages/uni-ui-types/src/uni-search-bar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,8 @@ type _UniSearchBarOnConfirmEvent = _UniSearchBarBaseEvent;
/** 确认时触发 */
type _UniSearchBarOnConfirm = (event: _UniSearchBarOnConfirmEvent) => void;

type _UniSearchBarOnInputEvent = _UniSearchBarBaseEvent;

/** value 改变时触发 */
type _UniSearchBarOnInput = (event: _UniSearchBarOnInputEvent) => void;
type _UniSearchBarOnInput = (value: _UniSearchBarValue) => void;

type _UniSearchBarOnCancelEvent = _UniSearchBarBaseEvent;

Expand Down Expand Up @@ -152,7 +150,6 @@ export type {
_UniSearchBarBaseEvent as UniSearchBarBaseEvent,
_UniSearchBarOnConfirmEvent as UniSearchBarOnConfirmEvent,
_UniSearchBarOnConfirm as UniSearchBarOnConfirm,
_UniSearchBarOnInputEvent as UniSearchBarOnInputEvent,
_UniSearchBarOnInput as UniSearchBarOnInput,
_UniSearchBarOnCancelEvent as UniSearchBarOnCancelEvent,
_UniSearchBarOnCancel as UniSearchBarOnCancel,
Expand Down Expand Up @@ -195,7 +192,6 @@ declare global {
export type UniSearchBarOnConfirmEvent = _UniSearchBarOnConfirmEvent;
/** 确认时触发 */
export interface UniSearchBarOnConfirm extends _UniSearchBarOnConfirm {}
export type UniSearchBarOnInputEvent = _UniSearchBarOnInputEvent;
/** value 改变时触发 */
export interface UniSearchBarOnInput extends _UniSearchBarOnInput {}
export type UniSearchBarOnCancelEvent = _UniSearchBarOnCancelEvent;
Expand Down
4 changes: 0 additions & 4 deletions packages/uni-ui-types/test/uni-search-bar.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import type {
UniSearchBarOnFocus,
UniSearchBarOnFocusEvent,
UniSearchBarOnInput,
UniSearchBarOnInputEvent,
UniSearchBarProps,
UniSearchBarValue,
} from "@uni-helper/uni-ui-types";
Expand All @@ -41,9 +40,6 @@ describe("UniSearchBar", () => {
expectTypeOf<UniSearchBarOnConfirm>().toBeObject();
expectTypeOf<UniSearchBarOnConfirm>().toEqualTypeOf<UniHelper.UniSearchBarOnConfirm>();

expectTypeOf<UniSearchBarOnInputEvent>().toBeObject();
expectTypeOf<UniSearchBarOnInputEvent>().toEqualTypeOf<UniHelper.UniSearchBarOnInputEvent>();

expectTypeOf<UniSearchBarOnInput>().toBeObject();
expectTypeOf<UniSearchBarOnInput>().toEqualTypeOf<UniHelper.UniSearchBarOnInput>();

Expand Down

0 comments on commit 2e32d7f

Please # to comment.