Decorators.d.ts 1.3 KB

123456789101112131415161718192021222324252627282930
  1. export type propType = 'String' | 'Number' | 'Boolean' | 'Select' | 'Vector2' | 'Vector3' | 'Object3D' | 'Prefab' | 'Texture' | 'Material' | 'Audio' | 'PositionalAudio' | 'Color' | 'AnimationClip' | 'Button';
  2. export declare function Prop(type: propType): (target: Object, propertyKey: string) => void;
  3. export declare function PropList(type: propType): (target: Object, propertyKey: string) => void;
  4. declare function decoratorFunc(target: Object, propertyKey: string): void;
  5. declare class Decorators {
  6. num(min?: number, max?: number): typeof decoratorFunc;
  7. checkbox(): typeof decoratorFunc;
  8. text(isTextArea?: boolean): typeof decoratorFunc;
  9. code(lang: 'json' | 'html' | 'glsl'): typeof decoratorFunc;
  10. select(): typeof decoratorFunc;
  11. vector2(): typeof decoratorFunc;
  12. vector3(): typeof decoratorFunc;
  13. prefab(): typeof decoratorFunc;
  14. material(): typeof decoratorFunc;
  15. texture(): typeof decoratorFunc;
  16. object3d(): typeof decoratorFunc;
  17. audio(isPositional?: boolean): typeof decoratorFunc;
  18. color(): typeof decoratorFunc;
  19. animation(): typeof decoratorFunc;
  20. button(): typeof decoratorFunc;
  21. }
  22. declare class ListProp extends Decorators {
  23. }
  24. declare class Props extends Decorators {
  25. private _list;
  26. get list(): ListProp;
  27. data(): typeof decoratorFunc;
  28. }
  29. export declare const props: Props;
  30. export {};