index.d.ts 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. export declare const NEW_CHECK_JSON_WAY = true;
  2. export interface Schema {
  3. id?: string;
  4. $schema?: string;
  5. $ref?: string;
  6. title?: string;
  7. description?: string;
  8. multipleOf?: number;
  9. maximum?: number;
  10. exclusiveMaximum?: boolean;
  11. minimum?: number;
  12. exclusiveMinimum?: boolean;
  13. maxLength?: number;
  14. minLength?: number;
  15. pattern?: string | RegExp;
  16. additionalItems?: boolean | Schema;
  17. items?: Schema | Schema[];
  18. maxItems?: number;
  19. minItems?: number;
  20. uniqueItems?: boolean;
  21. maxProperties?: number;
  22. minProperties?: number;
  23. required?: string[];
  24. additionalProperties?: boolean | Schema;
  25. definitions?: {
  26. [name: string]: Schema;
  27. };
  28. properties?: {
  29. [name: string]: Schema;
  30. };
  31. patternProperties?: {
  32. [name: string]: Schema;
  33. };
  34. dependencies?: {
  35. [name: string]: Schema | string[];
  36. };
  37. 'enum'?: any[];
  38. type?: string | string[];
  39. format?: string;
  40. allOf?: Schema[];
  41. anyOf?: Schema[];
  42. oneOf?: Schema[];
  43. not?: Schema;
  44. }
  45. export interface ISchema extends Schema {
  46. $version: number;
  47. }
  48. export interface IValidateResult {
  49. warning: string;
  50. error: Array<{
  51. errorType: string;
  52. errorProperty: string;
  53. correctType?: Array<string>;
  54. requireProperty?: string;
  55. }>;
  56. }
  57. export declare const config: {
  58. [key: string]: ISchema;
  59. };
  60. export declare type FILE = 'app' | 'ext' | 'game' | 'page' | 'plugin' | 'pluginpage' | 'projectconfig' | 'projectprivateconfig' | 'sitemap' | 'theme';