diff --git a/doric-js/index.d.ts b/doric-js/index.d.ts index fde1f399..21c5a696 100644 --- a/doric-js/index.d.ts +++ b/doric-js/index.d.ts @@ -1274,10 +1274,10 @@ declare module "doric" { * @returns: true means the replacement will take effect, otherwise does not */ beforeTextChange?: (change: { - editing: string; + editing?: string; start: number; length: number; - replacement: string; + replacement?: string; }) => boolean; padding?: { left?: number; diff --git a/doric-js/lib/src/widget/input.d.ts b/doric-js/lib/src/widget/input.d.ts index 181e1150..20aa2cb1 100644 --- a/doric-js/lib/src/widget/input.d.ts +++ b/doric-js/lib/src/widget/input.d.ts @@ -40,10 +40,10 @@ export declare class Input extends View { * @returns: true means the replacement will take effect, otherwise does not */ beforeTextChange?: (change: { - editing: string; + editing?: string; start: number; length: number; - replacement: string; + replacement?: string; }) => boolean; padding?: { left?: number; diff --git a/doric-js/src/widget/input.ts b/doric-js/src/widget/input.ts index 8aa36c69..7c6c90ce 100644 --- a/doric-js/src/widget/input.ts +++ b/doric-js/src/widget/input.ts @@ -98,10 +98,10 @@ export class Input extends View { */ @Property beforeTextChange?: (change: { - editing: string, + editing?: string, start: number, length: number, - replacement: string, + replacement?: string, }) => boolean @Property