transform.ts 883 B

123456789101112131415161718192021222324252627282930313233
  1. /**
  2. * Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info.
  3. *
  4. * @author David Sehnal <david.sehnal@gmail.com>
  5. */
  6. import { StateObject } from '../object';
  7. import { Transformer } from '../transformer';
  8. export interface Transform<A extends StateObject, B extends StateObject, P = any> {
  9. readonly instanceId: Transform.InstanceId,
  10. readonly transformer: Transformer<A, B, P>,
  11. readonly props: Transform.Props,
  12. readonly transformerId: string,
  13. readonly params: P,
  14. readonly ref: string
  15. // version is part of the tree
  16. }
  17. export namespace Transform {
  18. export type InstanceId = number & { '@type': 'transform-instance-id' }
  19. export interface Props {
  20. }
  21. export enum Flags {
  22. // Indicates that the transform was generated by a behaviour and should not be automatically updated
  23. Generated
  24. }
  25. }