@leafer/interface 1.9.8 → 1.9.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leafer/interface",
3
- "version": "1.9.8",
3
+ "version": "1.9.10",
4
4
  "description": "@leafer/interface",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -552,7 +552,8 @@ export interface ILeaf extends ILeafRender, ILeafHit, ILeafBounds, ILeafMatrix,
552
552
  __bindLeafer(leafer: ILeaferBase | null): void
553
553
 
554
554
  set(data: IObject, transition?: ITransition): void
555
- get(name?: string | string[] | IObject): ILeafInputData | IValue
555
+ get<K extends keyof this>(name: K): this[K]
556
+ get<K extends keyof this>(name?: K[] | ILeafInputData): ILeafInputData
556
557
  setAttr(name: string, value: any): void
557
558
  getAttr(name: string): any
558
559
  getComputedAttr(name: string): any
package/types/index.d.ts CHANGED
@@ -1693,7 +1693,8 @@ interface ILeaf extends ILeafRender, ILeafHit, ILeafBounds, ILeafMatrix, ILeafDa
1693
1693
  removeNextRender(item: IFunction): void;
1694
1694
  __bindLeafer(leafer: ILeaferBase | null): void;
1695
1695
  set(data: IObject, transition?: ITransition): void;
1696
- get(name?: string | string[] | IObject): ILeafInputData | IValue;
1696
+ get<K extends keyof this>(name: K): this[K];
1697
+ get<K extends keyof this>(name?: K[] | ILeafInputData): ILeafInputData;
1697
1698
  setAttr(name: string, value: any): void;
1698
1699
  getAttr(name: string): any;
1699
1700
  getComputedAttr(name: string): any;