@viewfly/core 2.0.0-alpha.0 → 2.0.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/index.d.ts +177 -110
- package/bundles/index.esm.js +1064 -634
- package/bundles/index.js +1092 -636
- package/package.json +2 -2
package/bundles/index.d.ts
CHANGED
|
@@ -169,10 +169,10 @@ declare function normalizeProvider(provider: Provider): NormalizedProvider;
|
|
|
169
169
|
*/
|
|
170
170
|
declare class ReflectiveInjector implements Injector {
|
|
171
171
|
parentInjector: Injector | null;
|
|
172
|
-
protected scope?: Scope | undefined;
|
|
172
|
+
protected scope?: Scope | null | undefined;
|
|
173
173
|
protected normalizedProviders: NormalizedProvider[];
|
|
174
174
|
protected recordValues: Map<Type<any> | AbstractType<any> | InjectionToken<any>, any>;
|
|
175
|
-
constructor(parentInjector: Injector | null, staticProviders: Provider[], scope?: Scope | undefined);
|
|
175
|
+
constructor(parentInjector: Injector | null, staticProviders: Provider[], scope?: Scope | null | undefined);
|
|
176
176
|
/**
|
|
177
177
|
* 用于获取当前注入器上下文内的实例、对象或数据
|
|
178
178
|
* @param token 访问 token
|
|
@@ -207,6 +207,7 @@ declare const JSXNodeFactory: {
|
|
|
207
207
|
createNode<T = string | ComponentSetup<any>>(type: T, props: Props & Record<string, any>, key?: Key): ViewFlyNode<T>;
|
|
208
208
|
};
|
|
209
209
|
|
|
210
|
+
declare function comparePropsWithCallbacks(oldProps: Record<string, any>, newProps: Record<string, any>, onDeleted: (key: string, oldValue: any) => void, onAdded: (key: string, value: any) => void, onUpdated: (key: string, newValue: any, oldValue: any) => void): void;
|
|
210
211
|
declare const TextAtomType: unique symbol;
|
|
211
212
|
declare const ElementAtomType: unique symbol;
|
|
212
213
|
declare const ComponentAtomType: unique symbol;
|
|
@@ -245,12 +246,6 @@ interface ComponentAtom {
|
|
|
245
246
|
namespace: ElementNamespace;
|
|
246
247
|
}
|
|
247
248
|
type Atom = TextAtom | ElementAtom | ComponentAtom;
|
|
248
|
-
interface ComponentView {
|
|
249
|
-
atom: ComponentAtom;
|
|
250
|
-
host: NativeNode;
|
|
251
|
-
isParent: boolean;
|
|
252
|
-
rootHost: NativeNode;
|
|
253
|
-
}
|
|
254
249
|
|
|
255
250
|
type NativeNode = Record<string, any>;
|
|
256
251
|
declare abstract class NativeRenderer<ElementNode = NativeNode, TextNode = NativeNode> {
|
|
@@ -376,29 +371,6 @@ declare function onMounted(callback: LifeCycleCallback): void;
|
|
|
376
371
|
* ```
|
|
377
372
|
*/
|
|
378
373
|
declare function onUpdated(callback: LifeCycleCallback): () => void;
|
|
379
|
-
interface PropsChangedCallback<T extends Props> {
|
|
380
|
-
(currentProps: T, oldProps: T): void | (() => void);
|
|
381
|
-
}
|
|
382
|
-
/**
|
|
383
|
-
* 当组件 props 更新地调用
|
|
384
|
-
* @param callback
|
|
385
|
-
* @example
|
|
386
|
-
* ```tsx
|
|
387
|
-
* function YourComponent(props) {
|
|
388
|
-
* onPropsChanged((currentProps, prevProps) => {
|
|
389
|
-
* console.log(currentProps, prevProps)
|
|
390
|
-
*
|
|
391
|
-
* return () => {
|
|
392
|
-
* console.log('destroy prev changed!')
|
|
393
|
-
* }
|
|
394
|
-
* })
|
|
395
|
-
* return () => {
|
|
396
|
-
* return <div>xxx</div>
|
|
397
|
-
* }
|
|
398
|
-
* }
|
|
399
|
-
* ```
|
|
400
|
-
*/
|
|
401
|
-
declare function onPropsChanged<T extends Props>(callback: PropsChangedCallback<T>): () => void;
|
|
402
374
|
/**
|
|
403
375
|
* 当组件销毁时调用回调函数
|
|
404
376
|
* @param callback
|
|
@@ -416,37 +388,47 @@ type JSXNode = JSX.Element | JSX.ElementClass | string | number | boolean | null
|
|
|
416
388
|
interface ComponentSetup<P = any> {
|
|
417
389
|
(props: P): (() => JSXNode) | ComponentInstance<P>;
|
|
418
390
|
}
|
|
391
|
+
interface ComponentViewMetadata {
|
|
392
|
+
atom: ComponentAtom;
|
|
393
|
+
host: NativeNode;
|
|
394
|
+
isParent: boolean;
|
|
395
|
+
rootHost: NativeNode;
|
|
396
|
+
}
|
|
419
397
|
/**
|
|
420
398
|
* Viewfly 组件管理类,用于管理组件的生命周期,上下文等
|
|
421
399
|
*/
|
|
422
400
|
declare class Component {
|
|
423
401
|
readonly parentComponent: Component | null;
|
|
424
402
|
readonly type: ComponentSetup;
|
|
425
|
-
props:
|
|
426
|
-
readonly key?: Key
|
|
403
|
+
props: Record<string, any>;
|
|
404
|
+
readonly key?: Key;
|
|
427
405
|
instance: ComponentInstance<Props>;
|
|
428
406
|
changedSubComponents: Set<Component>;
|
|
429
407
|
get dirty(): boolean;
|
|
430
408
|
get changed(): boolean;
|
|
409
|
+
/**
|
|
410
|
+
* @internal
|
|
411
|
+
*/
|
|
412
|
+
viewMetadata: ComponentViewMetadata;
|
|
431
413
|
unmountedCallbacks?: LifeCycleCallback[] | null;
|
|
432
414
|
mountCallbacks?: LifeCycleCallback[] | null;
|
|
433
|
-
propsChangedCallbacks?: PropsChangedCallback<any>[] | null;
|
|
434
415
|
updatedCallbacks?: LifeCycleCallback[] | null;
|
|
435
416
|
private updatedDestroyCallbacks?;
|
|
436
|
-
private propsChangedDestroyCallbacks?;
|
|
437
417
|
protected _dirty: boolean;
|
|
438
418
|
protected _changed: boolean;
|
|
439
419
|
private isFirstRendering;
|
|
420
|
+
private rawProps;
|
|
440
421
|
private refs;
|
|
441
422
|
private listener;
|
|
442
|
-
constructor(parentComponent: Component | null, type: ComponentSetup, props:
|
|
423
|
+
constructor(parentComponent: Component | null, type: ComponentSetup, props: Record<string, any>, key?: Key);
|
|
443
424
|
markAsDirtied(): void;
|
|
444
425
|
markAsChanged(changedComponent?: Component): void;
|
|
445
426
|
render(update: (template: JSXNode, portalHost?: NativeNode) => void): void;
|
|
446
|
-
|
|
427
|
+
updateProps(newProps: Record<string, any>): void;
|
|
428
|
+
canUpdate(oldProps: Record<string, any>, newProps: Record<string, any>): boolean;
|
|
429
|
+
rerender(): JSXNode;
|
|
447
430
|
destroy(): void;
|
|
448
431
|
rendered(): void;
|
|
449
|
-
private invokePropsChangedHooks;
|
|
450
432
|
private invokeMountHooks;
|
|
451
433
|
private invokeUpdatedHooks;
|
|
452
434
|
}
|
|
@@ -455,15 +437,42 @@ declare class Component {
|
|
|
455
437
|
*/
|
|
456
438
|
declare function getCurrentInstance(): Component;
|
|
457
439
|
|
|
458
|
-
declare function createContext(providers: Provider[], scope?: Scope, parentInjector?: Injector): (props: Props) => () => JSXNode | JSXNode[];
|
|
440
|
+
declare function createContext(providers: Provider[], scope?: Scope | null, parentInjector?: Injector): (props: Props) => () => JSXNode | JSXNode[];
|
|
459
441
|
/**
|
|
460
442
|
* 通过组件上下文获取 IoC 容器内数据的勾子方法
|
|
461
443
|
*/
|
|
462
444
|
declare function inject<T extends Type<any> | AbstractType<any> | InjectionToken<any>, U = never>(token: T, notFoundValue?: U, flags?: InjectFlags): ExtractValueType<T> | U;
|
|
445
|
+
interface ComponentAnnotation {
|
|
446
|
+
scope?: Scope;
|
|
447
|
+
providers?: Provider[];
|
|
448
|
+
}
|
|
449
|
+
/**
|
|
450
|
+
* 给组件添加注解
|
|
451
|
+
* @param annotation
|
|
452
|
+
* @param componentSetup
|
|
453
|
+
* @example
|
|
454
|
+
* ```ts
|
|
455
|
+
* export customScope = new Scope('scopeName')
|
|
456
|
+
* export const App = withAnnotation({
|
|
457
|
+
* scope: customScope,
|
|
458
|
+
* providers: [
|
|
459
|
+
* ExampleService
|
|
460
|
+
* ]
|
|
461
|
+
* }, function(props: Props) {
|
|
462
|
+
* return () => {
|
|
463
|
+
* return <div>...</div>
|
|
464
|
+
* }
|
|
465
|
+
* })
|
|
466
|
+
* ```
|
|
467
|
+
*/
|
|
468
|
+
declare function withAnnotation<T extends ComponentSetup>(annotation: ComponentAnnotation, componentSetup: T): T;
|
|
463
469
|
|
|
464
470
|
declare function withMemo<T extends Props = Props>(canUseMemo: ComponentInstance<T>['$useMemo'], render: () => JSXNode): ComponentInstance<T>;
|
|
465
471
|
|
|
466
|
-
declare const ElementNamespaceMap:
|
|
472
|
+
declare const ElementNamespaceMap: {
|
|
473
|
+
readonly svg: "svg";
|
|
474
|
+
readonly math: "mathml";
|
|
475
|
+
};
|
|
467
476
|
declare function createRenderer(component: Component, nativeRenderer: NativeRenderer, namespace: ElementNamespace): (host: NativeNode) => void;
|
|
468
477
|
|
|
469
478
|
/**
|
|
@@ -475,75 +484,6 @@ declare class RootComponent extends Component {
|
|
|
475
484
|
markAsChanged(changedComponent?: Component): void;
|
|
476
485
|
}
|
|
477
486
|
|
|
478
|
-
/**
|
|
479
|
-
* 组件状态实例,直接调用可以获取最新的状态,通过 set 方法可以更新状态
|
|
480
|
-
*/
|
|
481
|
-
interface Signal<T> {
|
|
482
|
-
/**
|
|
483
|
-
* 直接调用一个 Signal 实例,可以获取最新状态
|
|
484
|
-
*/
|
|
485
|
-
(): T;
|
|
486
|
-
/**
|
|
487
|
-
* 更新组件状态的方法,可以传入最新的值
|
|
488
|
-
* @param newState
|
|
489
|
-
*/
|
|
490
|
-
set(newState: T): void;
|
|
491
|
-
}
|
|
492
|
-
/**
|
|
493
|
-
* 组件状态管理器
|
|
494
|
-
* @param state 初始状态
|
|
495
|
-
* @example
|
|
496
|
-
* ```tsx
|
|
497
|
-
* function App() {
|
|
498
|
-
* // 初始化状态
|
|
499
|
-
* const state = createSignal(1)
|
|
500
|
-
*
|
|
501
|
-
* return () => {
|
|
502
|
-
* <div>
|
|
503
|
-
* <div>当前值为:{state()}</div>
|
|
504
|
-
* <div>
|
|
505
|
-
* <button type="button" onClick={() => {
|
|
506
|
-
* // 当点击时更新状态
|
|
507
|
-
* state.set(state() + 1)
|
|
508
|
-
* }
|
|
509
|
-
* }>updateState</button>
|
|
510
|
-
* </div>
|
|
511
|
-
* </div>
|
|
512
|
-
* }
|
|
513
|
-
* }
|
|
514
|
-
*/
|
|
515
|
-
declare function createSignal<T>(state: T): Signal<T>;
|
|
516
|
-
/**
|
|
517
|
-
* 使用派生值,Viewfly 会收集回调函数内同步执行时访问的 Signal,
|
|
518
|
-
* 并在你获取 createDerived 函数返回的 Signal 的值时,自动计算最新的值。
|
|
519
|
-
*
|
|
520
|
-
* @param fn
|
|
521
|
-
* @param isContinue 可选的停止函数,在每次值更新后调用,当返回值为 false 时,将不再监听依赖的变化
|
|
522
|
-
*/
|
|
523
|
-
declare function computed<T>(fn: () => T, isContinue?: (data: T) => unknown): Signal<T>;
|
|
524
|
-
declare const createDerived: typeof computed;
|
|
525
|
-
interface WatchCallback<T> {
|
|
526
|
-
(newValue: T, oldValue: T): void | (() => void);
|
|
527
|
-
}
|
|
528
|
-
/**
|
|
529
|
-
* 监听状态变化,当任意一个状态发生变更时,触发回调。
|
|
530
|
-
* watch 会返回一个取消监听的函数,调用此函数,可以取消监听。
|
|
531
|
-
* 当在组件中调用时,组件销毁时会自动取消监听。
|
|
532
|
-
* @param deps 依赖的状态 Signal,可以是一个 Signal,只可以一个数包含 Signal 的数组,或者是一个求值函数
|
|
533
|
-
* @param callback 状态变更后的回调函数
|
|
534
|
-
*/
|
|
535
|
-
declare function watch<T>(deps: Signal<T>, callback: WatchCallback<T>): () => void;
|
|
536
|
-
declare function watch<T>(deps: [Signal<T>], callback: WatchCallback<[T]>): () => void;
|
|
537
|
-
declare function watch<T, T1>(deps: [Signal<T>, Signal<T1>], callback: WatchCallback<[T, T1]>): () => void;
|
|
538
|
-
declare function watch<T, T1, T2>(deps: [Signal<T>, Signal<T1>, Signal<T2>], callback: WatchCallback<[T, T1, T2]>): () => void;
|
|
539
|
-
declare function watch<T, T1, T2, T3>(deps: [Signal<T>, Signal<T1>, Signal<T2>, Signal<T3>], callback: WatchCallback<[T, T1, T2, T3]>): () => void;
|
|
540
|
-
declare function watch<T, T1, T2, T3, T4>(deps: [Signal<T>, Signal<T1>, Signal<T2>, Signal<T3>, Signal<T4>], callback: WatchCallback<[T, T1, T2, T3, T4]>): () => void;
|
|
541
|
-
declare function watch<T, T1, T2, T3, T4, T5>(deps: [Signal<T>, Signal<T1>, Signal<T2>, Signal<T3>, Signal<T4>, Signal<T5>], callback: WatchCallback<[T, T1, T2, T3, T4, T5]>): () => void;
|
|
542
|
-
declare function watch<T, T1, T2, T3, T4, T5, T6>(deps: [Signal<T>, Signal<T1>, Signal<T2>, Signal<T3>, Signal<T4>, Signal<T5>, Signal<T6>], callback: WatchCallback<[T, T1, T2, T3, T4, T5, T6]>): () => void;
|
|
543
|
-
declare function watch<T, T1, T2, T3, T4, T5, T6, T7>(deps: [Signal<T>, Signal<T1>, Signal<T2>, Signal<T3>, Signal<T4>, Signal<T5>, Signal<T6>, Signal<T7>], callback: WatchCallback<[T, T1, T2, T3, T4, T5, T6, T7]>): () => void;
|
|
544
|
-
declare function watch<T>(deps: () => T, callback: WatchCallback<T>): () => void;
|
|
545
|
-
declare function watch<T = any>(deps: Signal<any>[], callback: WatchCallback<T[]>): () => void;
|
|
546
|
-
|
|
547
487
|
/**
|
|
548
488
|
* Viewfly 配置项
|
|
549
489
|
*/
|
|
@@ -573,4 +513,131 @@ interface Module {
|
|
|
573
513
|
}
|
|
574
514
|
declare function viewfly<T extends NativeNode>(config: Config): Application<T>;
|
|
575
515
|
|
|
576
|
-
|
|
516
|
+
interface Computed<T> {
|
|
517
|
+
readonly value: T;
|
|
518
|
+
}
|
|
519
|
+
declare function computed<T>(callback: () => T, isContinue?: (data: T) => unknown): Computed<T>;
|
|
520
|
+
|
|
521
|
+
declare class Dep {
|
|
522
|
+
effect: () => void;
|
|
523
|
+
destroyCallbacks: Array<() => void>;
|
|
524
|
+
constructor(effect: () => void);
|
|
525
|
+
destroy(): void;
|
|
526
|
+
}
|
|
527
|
+
declare function getDepContext(): Dep | undefined;
|
|
528
|
+
declare function pushDepContext(dep: Dep): void;
|
|
529
|
+
declare function popDepContext(): void;
|
|
530
|
+
declare enum TrackOpTypes {
|
|
531
|
+
Get = "Get",
|
|
532
|
+
Has = "Has",
|
|
533
|
+
Iterate = "Iterate"
|
|
534
|
+
}
|
|
535
|
+
declare enum TriggerOpTypes {
|
|
536
|
+
Set = "Set",
|
|
537
|
+
Add = "Add",
|
|
538
|
+
Delete = "Delete",
|
|
539
|
+
Clear = "Clear"
|
|
540
|
+
}
|
|
541
|
+
declare function track(target: object, type: TrackOpTypes, key?: unknown): void;
|
|
542
|
+
declare function trigger(target: object, type: TriggerOpTypes, key?: unknown): void;
|
|
543
|
+
declare function registryComponentDestroyCallback(fn: () => void): void;
|
|
544
|
+
|
|
545
|
+
declare const rawToProxyCache: WeakMap<object, any>;
|
|
546
|
+
declare const proxyToRawCache: WeakMap<object, any>;
|
|
547
|
+
declare function toRaw<T>(value: T): T;
|
|
548
|
+
declare function isReactive(value: any): boolean;
|
|
549
|
+
interface ReactiveConfig {
|
|
550
|
+
readonly: boolean;
|
|
551
|
+
shallow: boolean;
|
|
552
|
+
}
|
|
553
|
+
declare function internalWrite(fn: () => void): void;
|
|
554
|
+
declare class ObjectReactiveHandler<T extends object> implements ProxyHandler<T> {
|
|
555
|
+
protected isShallow: boolean;
|
|
556
|
+
protected isReadonly: boolean;
|
|
557
|
+
constructor(config: ReactiveConfig);
|
|
558
|
+
set(target: T, p: string | symbol, newValue: any, receiver: any): boolean;
|
|
559
|
+
get(target: T, p: string | symbol, receiver: any): any;
|
|
560
|
+
deleteProperty(target: T, p: string | symbol): boolean;
|
|
561
|
+
ownKeys(target: T): ArrayLike<string | symbol>;
|
|
562
|
+
}
|
|
563
|
+
declare class ArrayReactiveHandler extends ObjectReactiveHandler<any[]> {
|
|
564
|
+
interceptors: {
|
|
565
|
+
entries(): Generator<unknown[], void, unknown>;
|
|
566
|
+
keys(): Generator<unknown, void, unknown>;
|
|
567
|
+
values(): Generator<unknown, void, unknown>;
|
|
568
|
+
concat(this: any, ...items: any[]): any[];
|
|
569
|
+
every(this: any, predicate: (value: unknown, index: number, array: unknown[]) => unknown, thisArg?: unknown): any;
|
|
570
|
+
filter(this: any, predicate: (value: unknown, index: number, array: unknown[]) => unknown, thisArg?: any): any;
|
|
571
|
+
find(predicate: (value: unknown, index: number, obj: unknown[]) => unknown, thisArg?: any): any;
|
|
572
|
+
findIndex(predicate: (value: unknown, index: number, obj: unknown[]) => unknown, thisArg?: any): number;
|
|
573
|
+
findLast(predicate: (value: unknown, index: number, array: unknown[]) => unknown, thisArg?: any): any;
|
|
574
|
+
findLastIndex(predicate: (value: unknown, index: number, array: unknown[]) => unknown, thisArg?: any): number;
|
|
575
|
+
forEach(callbackfn: (value: unknown, index: number, array: unknown[]) => void, thisArg?: any): any;
|
|
576
|
+
includes(...args: unknown[]): boolean;
|
|
577
|
+
indexOf(...args: unknown[]): number;
|
|
578
|
+
join(separator?: string | undefined): string;
|
|
579
|
+
lastIndexOf(...args: unknown[]): number;
|
|
580
|
+
map<U>(callbackFn: (value: unknown, index: number, array: unknown[]) => U, thisArg?: any): U[];
|
|
581
|
+
pop(): any;
|
|
582
|
+
push(this: any, ...items: any[]): any;
|
|
583
|
+
reduce(callbackFn: (previousValue: unknown, currentValue: unknown, currentIndex: number, array: unknown[]) => unknown, ...args: any[]): any;
|
|
584
|
+
reduceRight(callbackFn: (previousValue: unknown, currentValue: unknown, currentIndex: number, array: unknown[]) => unknown, ...args: any[]): any;
|
|
585
|
+
shift(): any;
|
|
586
|
+
some(predicate: (value: unknown, index: number, array: unknown[]) => unknown, thisArg?: any): boolean;
|
|
587
|
+
splice(start: number, deleteCount?: number | undefined): unknown[];
|
|
588
|
+
toReversed(): any;
|
|
589
|
+
toSorted(compareFn?: ((a: unknown, b: unknown) => number) | undefined): any;
|
|
590
|
+
toSpliced(start: number, deleteCount: number, ...items: any[]): any;
|
|
591
|
+
unshift(...items: any[]): number;
|
|
592
|
+
[Symbol.iterator](): Generator<unknown, void, unknown>;
|
|
593
|
+
};
|
|
594
|
+
constructor(config: ReactiveConfig);
|
|
595
|
+
get(target: any[], p: string | symbol, receiver: any): any;
|
|
596
|
+
}
|
|
597
|
+
declare class MapReactiveHandler extends ObjectReactiveHandler<Map<any, any> | WeakMap<object, any>> {
|
|
598
|
+
interceptors: {
|
|
599
|
+
entries(): Generator<unknown[], void, unknown>;
|
|
600
|
+
keys(): Generator<unknown, void, unknown>;
|
|
601
|
+
values(): Generator<unknown, void, unknown>;
|
|
602
|
+
get(this: any, key: any): unknown;
|
|
603
|
+
set(this: any, key: any, value: any): Map<any, any>;
|
|
604
|
+
has(this: any, key: any): any;
|
|
605
|
+
delete(this: any, key: any): any;
|
|
606
|
+
forEach(this: any, callbackFn: (value: any, key: any, map: Map<any, any>) => void, thisArg?: any): void;
|
|
607
|
+
clear(this: any): void;
|
|
608
|
+
[Symbol.iterator](): Generator<unknown[], void, unknown>;
|
|
609
|
+
};
|
|
610
|
+
constructor(config: ReactiveConfig);
|
|
611
|
+
get(target: Map<any, any> | WeakMap<object, any>, p: string | symbol, receiver: any): any;
|
|
612
|
+
}
|
|
613
|
+
declare class SetReactiveHandler extends ObjectReactiveHandler<Set<any> | WeakSet<object>> {
|
|
614
|
+
interceptors: {
|
|
615
|
+
entries(): Generator<unknown[], void, unknown>;
|
|
616
|
+
keys(): Generator<unknown, void, unknown>;
|
|
617
|
+
values(): Generator<unknown, void, unknown>;
|
|
618
|
+
add(this: any, value: any): any;
|
|
619
|
+
delete(this: any, value: any): any;
|
|
620
|
+
has(this: any, key: any): any;
|
|
621
|
+
forEach(this: any, callbackFn: (value: any, value2: any, set: Set<any>) => void, thisArg?: any): void;
|
|
622
|
+
clear(this: any): void;
|
|
623
|
+
[Symbol.iterator](): Generator<unknown, void, unknown>;
|
|
624
|
+
};
|
|
625
|
+
constructor(config: ReactiveConfig);
|
|
626
|
+
get(target: Set<any> | WeakSet<object>, p: string | symbol, receiver: any): any;
|
|
627
|
+
}
|
|
628
|
+
declare const defaultObjectReactiveHandler: ObjectReactiveHandler<object>;
|
|
629
|
+
declare const defaultArrayReactiveHandler: ArrayReactiveHandler;
|
|
630
|
+
declare const defaultMapReactiveHandler: MapReactiveHandler;
|
|
631
|
+
declare const defaultSetReactiveHandler: SetReactiveHandler;
|
|
632
|
+
declare const readonlyProxyHandler: ObjectReactiveHandler<object>;
|
|
633
|
+
declare function reactive<T>(raw: T): T;
|
|
634
|
+
|
|
635
|
+
declare const defaultShallowObjectReactiveHandler: ObjectReactiveHandler<object>;
|
|
636
|
+
declare const defaultShallowArrayReactiveHandler: ArrayReactiveHandler;
|
|
637
|
+
declare const defaultShallowMapReactiveHandler: MapReactiveHandler;
|
|
638
|
+
declare const defaultShallowSetReactiveHandler: SetReactiveHandler;
|
|
639
|
+
declare function shallowReactive<T>(raw: T): T;
|
|
640
|
+
|
|
641
|
+
declare function watch<T>(trigger: () => T, callback: (newValue: T, oldValue: T) => (() => any) | void): () => void;
|
|
642
|
+
|
|
643
|
+
export { type AbstractInstanceType, type AbstractProvider, type AbstractType, type Application, ArrayReactiveHandler, type Atom, type ClassNames, type ClassProvider, Component, type ComponentAnnotation, type ComponentInstance, type ComponentSetup, type ComponentViewMetadata, type Computed, type Config, type ConstructorProvider, Dep, DynamicRef, type ElementNamespace, ElementNamespaceMap, type ExistingProvider, type ExtractInstanceType, type ExtractValueType, type FactoryProvider, ForwardRef, Fragment, Inject, type InjectDecorator, InjectFlags, Injectable, type InjectableDecorator, type InjectableOptions, InjectionToken, Injector, JSX, type JSXNode, JSXNodeFactory, type Key, type LifeCycleCallback, MapReactiveHandler, type Module, type NativeNode, NativeRenderer, type NormalizedProvider, NullInjector, ObjectReactiveHandler, Optional, type OptionalDecorator, Prop, type PropDecorator, type Props, type ProvideScope, type Provider, type ReactiveConfig, type RefListener, type ReflectiveDependency, ReflectiveInjector, RootComponent, Scope, Self, type SelfDecorator, SetReactiveHandler, SkipSelf, type SkipSelfDecorator, type StaticProvider, StaticRef, THROW_IF_NOT_FOUND, TrackOpTypes, TriggerOpTypes, Type, type TypeProvider, type ValueProvider, type ViewFlyNode, comparePropsWithCallbacks, computed, createContext, createDynamicRef, createRef, createRenderer, defaultArrayReactiveHandler, defaultMapReactiveHandler, defaultObjectReactiveHandler, defaultSetReactiveHandler, defaultShallowArrayReactiveHandler, defaultShallowMapReactiveHandler, defaultShallowObjectReactiveHandler, defaultShallowSetReactiveHandler, forwardRef, getCurrentInstance, getDepContext, getSetupContext, inject, internalWrite, isReactive, jsx, jsxs, makeError, normalizeProvider, onMounted, onUnmounted, onUpdated, popDepContext, proxyToRawCache, pushDepContext, rawToProxyCache, reactive, readonlyProxyHandler, registryComponentDestroyCallback, shallowReactive, toRaw, track, trigger, viewfly, watch, withAnnotation, withMemo };
|