create.d.ts 941 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /**
  2. * @param {Definition} definition
  3. * Definition.
  4. * @returns {Schema}
  5. * Schema.
  6. */
  7. export function create(definition: Definition): Schema;
  8. /**
  9. * Definition of a schema.
  10. */
  11. export type Definition = {
  12. /**
  13. * Normalzed names to special attribute case.
  14. */
  15. attributes?: Record<string, string> | undefined;
  16. /**
  17. * Normalized names that must be set as properties.
  18. */
  19. mustUseProperty?: ReadonlyArray<string> | undefined;
  20. /**
  21. * Property names to their types.
  22. */
  23. properties: Record<string, number | null>;
  24. /**
  25. * Space.
  26. */
  27. space?: Space | undefined;
  28. /**
  29. * Transform a property name.
  30. */
  31. transform: Transform;
  32. };
  33. /**
  34. * Transform.
  35. */
  36. export type Transform = (attributes: Record<string, string>, property: string) => string;
  37. import { Schema } from './schema.js';
  38. import type { Space } from 'property-information';
  39. //# sourceMappingURL=create.d.ts.map