123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- export declare namespace Weapp {
- export interface FormField {
- data: {
- name: string;
- value: any;
- };
- }
- interface Target {
- id: string;
- tagName: string;
- dataset: {
- [key: string]: any;
- };
- }
- export interface Event {
-
- type: string;
-
- timeStamp: number;
-
- target: Target;
-
- currentTarget: Target;
-
- detail: any;
- }
- interface Touch {
-
- identifier: number;
-
- pageX: number;
-
- pageY: number;
-
- clientX: number;
-
- clientY: number;
- }
- export interface TouchEvent extends Event {
- touches: Array<Touch>;
- changedTouches: Array<Touch>;
- }
-
- export interface RelationOption<Instance> {
-
- type: 'parent' | 'child' | 'ancestor' | 'descendant';
-
- linked?(this: Instance, target: WechatMiniprogram.Component.TrivialInstance): void;
-
- linkChanged?(this: Instance, target: WechatMiniprogram.Component.TrivialInstance): void;
-
- unlinked?(this: Instance, target: WechatMiniprogram.Component.TrivialInstance): void;
-
- target?: string;
- }
-
- type Observer<Instance, T> = (this: Instance, newVal: T, oldVal: T, changedPath: Array<string | number>) => void;
-
- export interface MethodOption<Instance> {
- [name: string]: (this: Instance, ...args: any[]) => any;
- }
- export interface ComputedOption<Instance> {
- [name: string]: (this: Instance) => any;
- }
- type PropertyType = StringConstructor | NumberConstructor | BooleanConstructor | ArrayConstructor | ObjectConstructor | FunctionConstructor | null;
- export interface PropertyOption {
- [name: string]: PropertyType | PropertyType[] | {
-
- type: PropertyType | PropertyType[];
-
- value?: any;
-
- observer?: string | Observer<WechatMiniprogram.Component.TrivialInstance, any>;
-
- optionalTypes?: PropertyType[];
- };
- }
- export {};
- }
|