quicktype 17.0.0 → 17.0.1

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.
Files changed (139) hide show
  1. package/dist/cli/CompressedJSONFromStream.js +38 -26
  2. package/dist/cli/GraphQLIntrospection.js +41 -33
  3. package/dist/cli/TypeSource.d.ts +1 -1
  4. package/dist/cli/URLGrammar.js +3 -4
  5. package/dist/cli/index.js +364 -363
  6. package/dist/quicktype-core/Annotation.js +0 -2
  7. package/dist/quicktype-core/ConvenienceRenderer.d.ts +17 -17
  8. package/dist/quicktype-core/ConvenienceRenderer.js +81 -104
  9. package/dist/quicktype-core/DateTime.js +0 -1
  10. package/dist/quicktype-core/DeclarationIR.d.ts +1 -1
  11. package/dist/quicktype-core/DeclarationIR.js +10 -13
  12. package/dist/quicktype-core/EncodedMarkovChain.js +0 -1
  13. package/dist/quicktype-core/GatherNames.js +25 -47
  14. package/dist/quicktype-core/Graph.d.ts +2 -2
  15. package/dist/quicktype-core/Graph.js +19 -23
  16. package/dist/quicktype-core/GraphRewriting.d.ts +2 -2
  17. package/dist/quicktype-core/GraphRewriting.js +54 -65
  18. package/dist/quicktype-core/MakeTransformations.js +22 -23
  19. package/dist/quicktype-core/MarkovChain.d.ts +3 -3
  20. package/dist/quicktype-core/MarkovChain.js +8 -9
  21. package/dist/quicktype-core/Messages.d.ts +3 -3
  22. package/dist/quicktype-core/Messages.js +3 -8
  23. package/dist/quicktype-core/Naming.d.ts +11 -11
  24. package/dist/quicktype-core/Naming.js +61 -76
  25. package/dist/quicktype-core/Renderer.d.ts +6 -6
  26. package/dist/quicktype-core/Renderer.js +17 -34
  27. package/dist/quicktype-core/RendererOptions.d.ts +5 -5
  28. package/dist/quicktype-core/RendererOptions.js +3 -6
  29. package/dist/quicktype-core/Run.d.ts +9 -9
  30. package/dist/quicktype-core/Run.js +67 -72
  31. package/dist/quicktype-core/Source.d.ts +3 -3
  32. package/dist/quicktype-core/Source.js +18 -19
  33. package/dist/quicktype-core/TargetLanguage.d.ts +10 -10
  34. package/dist/quicktype-core/TargetLanguage.js +2 -6
  35. package/dist/quicktype-core/Transformers.d.ts +25 -25
  36. package/dist/quicktype-core/Transformers.js +66 -94
  37. package/dist/quicktype-core/Type.d.ts +43 -41
  38. package/dist/quicktype-core/Type.js +71 -96
  39. package/dist/quicktype-core/TypeBuilder.d.ts +2 -2
  40. package/dist/quicktype-core/TypeBuilder.js +47 -53
  41. package/dist/quicktype-core/TypeGraph.d.ts +4 -4
  42. package/dist/quicktype-core/TypeGraph.js +40 -49
  43. package/dist/quicktype-core/TypeUtils.d.ts +2 -2
  44. package/dist/quicktype-core/TypeUtils.js +22 -23
  45. package/dist/quicktype-core/UnifyClasses.js +12 -16
  46. package/dist/quicktype-core/UnionBuilder.d.ts +3 -3
  47. package/dist/quicktype-core/UnionBuilder.js +30 -33
  48. package/dist/quicktype-core/attributes/AccessorNames.d.ts +2 -2
  49. package/dist/quicktype-core/attributes/AccessorNames.js +17 -18
  50. package/dist/quicktype-core/attributes/Constraints.d.ts +3 -3
  51. package/dist/quicktype-core/attributes/Constraints.js +4 -8
  52. package/dist/quicktype-core/attributes/Description.js +5 -6
  53. package/dist/quicktype-core/attributes/EnumValues.js +3 -4
  54. package/dist/quicktype-core/attributes/StringTypes.d.ts +1 -1
  55. package/dist/quicktype-core/attributes/StringTypes.js +21 -24
  56. package/dist/quicktype-core/attributes/TypeAttributes.d.ts +3 -3
  57. package/dist/quicktype-core/attributes/TypeAttributes.js +10 -12
  58. package/dist/quicktype-core/attributes/TypeNames.d.ts +9 -9
  59. package/dist/quicktype-core/attributes/TypeNames.js +21 -49
  60. package/dist/quicktype-core/attributes/URIAttributes.d.ts +1 -1
  61. package/dist/quicktype-core/attributes/URIAttributes.js +6 -10
  62. package/dist/quicktype-core/index.js +125 -128
  63. package/dist/quicktype-core/input/CompressedJSON.d.ts +7 -7
  64. package/dist/quicktype-core/input/CompressedJSON.js +54 -49
  65. package/dist/quicktype-core/input/FetchingJSONSchemaStore.js +13 -5
  66. package/dist/quicktype-core/input/Inference.d.ts +2 -2
  67. package/dist/quicktype-core/input/Inference.js +17 -25
  68. package/dist/quicktype-core/input/Inputs.d.ts +2 -2
  69. package/dist/quicktype-core/input/Inputs.js +54 -38
  70. package/dist/quicktype-core/input/JSONSchemaInput.d.ts +11 -11
  71. package/dist/quicktype-core/input/JSONSchemaInput.js +523 -503
  72. package/dist/quicktype-core/input/JSONSchemaStore.d.ts +1 -1
  73. package/dist/quicktype-core/input/JSONSchemaStore.js +35 -24
  74. package/dist/quicktype-core/input/PostmanCollection.js +1 -2
  75. package/dist/quicktype-core/input/io/NodeIO.js +44 -55
  76. package/dist/quicktype-core/input/io/get-stream/index.js +2 -6
  77. package/dist/quicktype-core/language/All.js +2 -3
  78. package/dist/quicktype-core/language/CPlusPlus.d.ts +8 -8
  79. package/dist/quicktype-core/language/CPlusPlus.js +151 -185
  80. package/dist/quicktype-core/language/CSharp.d.ts +7 -7
  81. package/dist/quicktype-core/language/CSharp.js +72 -82
  82. package/dist/quicktype-core/language/Crystal.d.ts +2 -2
  83. package/dist/quicktype-core/language/Crystal.js +17 -18
  84. package/dist/quicktype-core/language/Dart.d.ts +4 -4
  85. package/dist/quicktype-core/language/Dart.js +34 -36
  86. package/dist/quicktype-core/language/Elm.d.ts +6 -6
  87. package/dist/quicktype-core/language/Elm.js +45 -47
  88. package/dist/quicktype-core/language/Golang.d.ts +4 -4
  89. package/dist/quicktype-core/language/Golang.js +20 -23
  90. package/dist/quicktype-core/language/Haskell.d.ts +5 -5
  91. package/dist/quicktype-core/language/Haskell.js +23 -25
  92. package/dist/quicktype-core/language/JSONSchema.d.ts +3 -3
  93. package/dist/quicktype-core/language/JSONSchema.js +16 -17
  94. package/dist/quicktype-core/language/Java.d.ts +2 -2
  95. package/dist/quicktype-core/language/Java.js +97 -97
  96. package/dist/quicktype-core/language/JavaScript.d.ts +7 -7
  97. package/dist/quicktype-core/language/JavaScript.js +17 -19
  98. package/dist/quicktype-core/language/JavaScriptPropTypes.js +13 -15
  99. package/dist/quicktype-core/language/JavaScriptUnicodeMaps.js +11 -12
  100. package/dist/quicktype-core/language/Kotlin.d.ts +2 -2
  101. package/dist/quicktype-core/language/Kotlin.js +37 -39
  102. package/dist/quicktype-core/language/Objective-C.d.ts +3 -3
  103. package/dist/quicktype-core/language/Objective-C.js +41 -45
  104. package/dist/quicktype-core/language/Php.d.ts +2 -2
  105. package/dist/quicktype-core/language/Php.js +41 -66
  106. package/dist/quicktype-core/language/Pike.d.ts +1 -1
  107. package/dist/quicktype-core/language/Pike.js +17 -18
  108. package/dist/quicktype-core/language/Python.d.ts +8 -8
  109. package/dist/quicktype-core/language/Python.js +64 -63
  110. package/dist/quicktype-core/language/Rust.d.ts +2 -2
  111. package/dist/quicktype-core/language/Rust.js +19 -21
  112. package/dist/quicktype-core/language/Swift.d.ts +7 -7
  113. package/dist/quicktype-core/language/Swift.js +804 -807
  114. package/dist/quicktype-core/language/TypeScriptFlow.d.ts +7 -7
  115. package/dist/quicktype-core/language/TypeScriptFlow.js +26 -28
  116. package/dist/quicktype-core/language/ruby/index.d.ts +4 -4
  117. package/dist/quicktype-core/language/ruby/index.js +24 -49
  118. package/dist/quicktype-core/language/ruby/keywords.js +0 -1
  119. package/dist/quicktype-core/rewrites/CombineClasses.js +8 -9
  120. package/dist/quicktype-core/rewrites/ExpandStrings.d.ts +1 -1
  121. package/dist/quicktype-core/rewrites/ExpandStrings.js +17 -18
  122. package/dist/quicktype-core/rewrites/FlattenStrings.js +6 -7
  123. package/dist/quicktype-core/rewrites/FlattenUnions.js +8 -9
  124. package/dist/quicktype-core/rewrites/InferMaps.js +10 -11
  125. package/dist/quicktype-core/rewrites/ReplaceObjectType.js +7 -8
  126. package/dist/quicktype-core/rewrites/ResolveIntersections.js +67 -68
  127. package/dist/quicktype-core/support/Acronyms.js +1 -3
  128. package/dist/quicktype-core/support/Chance.js +0 -10
  129. package/dist/quicktype-core/support/Converters.js +0 -1
  130. package/dist/quicktype-core/support/Strings.d.ts +4 -4
  131. package/dist/quicktype-core/support/Strings.js +16 -17
  132. package/dist/quicktype-core/support/Support.d.ts +1 -1
  133. package/dist/quicktype-core/support/Support.js +6 -30
  134. package/dist/quicktype-graphql-input/GraphQLSchema.d.ts +4 -4
  135. package/dist/quicktype-graphql-input/GraphQLSchema.js +0 -1
  136. package/dist/quicktype-graphql-input/index.d.ts +1 -1
  137. package/dist/quicktype-graphql-input/index.js +212 -229
  138. package/dist/quicktype-typescript-input/index.js +4 -28
  139. package/package.json +19 -25
@@ -17,11 +17,11 @@ export declare const phpOptions: {
17
17
  export declare class PhpTargetLanguage extends TargetLanguage {
18
18
  constructor();
19
19
  protected getOptions(): Option<any>[];
20
- get supportsUnionsWithBothNumberTypes(): boolean;
20
+ readonly supportsUnionsWithBothNumberTypes: boolean;
21
21
  protected makeRenderer(renderContext: RenderContext, untypedOptionValues: {
22
22
  [name: string]: any;
23
23
  }): PhpRenderer;
24
- get stringTypeMapping(): StringTypeMapping;
24
+ readonly stringTypeMapping: StringTypeMapping;
25
25
  }
26
26
  export declare const stringEscape: (s: string) => string;
27
27
  export declare function phpNameStyle(startWithUpper: boolean, upperUnderscore: boolean, original: string, acronymsStyle?: (s: string) => string): string;
@@ -1,29 +1,5 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.PhpRenderer = exports.phpNameStyle = exports.stringEscape = exports.PhpTargetLanguage = exports.phpOptions = void 0;
27
3
  const Annotation_1 = require("../Annotation");
28
4
  const ConvenienceRenderer_1 = require("../ConvenienceRenderer");
29
5
  const Naming_1 = require("../Naming");
@@ -34,13 +10,13 @@ const Strings_1 = require("../support/Strings");
34
10
  const Support_1 = require("../support/Support");
35
11
  const TargetLanguage_1 = require("../TargetLanguage");
36
12
  const TypeUtils_1 = require("../TypeUtils");
37
- const _ = __importStar(require("lodash"));
13
+ const _ = require("lodash");
38
14
  exports.phpOptions = {
39
15
  withGet: new RendererOptions_1.BooleanOption("with-get", "Create Getter", true),
40
16
  fastGet: new RendererOptions_1.BooleanOption("fast-get", "getter without validation", false),
41
17
  withSet: new RendererOptions_1.BooleanOption("with-set", "Create Setter", false),
42
18
  withClosing: new RendererOptions_1.BooleanOption("with-closing", "PHP Closing Tag", false),
43
- acronymStyle: (0, Acronyms_1.acronymOption)(Acronyms_1.AcronymStyleOptions.Pascal)
19
+ acronymStyle: Acronyms_1.acronymOption(Acronyms_1.AcronymStyleOptions.Pascal)
44
20
  };
45
21
  class PhpTargetLanguage extends TargetLanguage_1.TargetLanguage {
46
22
  constructor() {
@@ -53,7 +29,7 @@ class PhpTargetLanguage extends TargetLanguage_1.TargetLanguage {
53
29
  return true;
54
30
  }
55
31
  makeRenderer(renderContext, untypedOptionValues) {
56
- const options = (0, RendererOptions_1.getOptionValues)(exports.phpOptions, untypedOptionValues);
32
+ const options = RendererOptions_1.getOptionValues(exports.phpOptions, untypedOptionValues);
57
33
  return new PhpRenderer(this, renderContext, options);
58
34
  }
59
35
  get stringTypeMapping() {
@@ -66,30 +42,29 @@ class PhpTargetLanguage extends TargetLanguage_1.TargetLanguage {
66
42
  }
67
43
  }
68
44
  exports.PhpTargetLanguage = PhpTargetLanguage;
69
- exports.stringEscape = (0, Strings_1.utf16ConcatMap)((0, Strings_1.escapeNonPrintableMapper)(Strings_1.isAscii, Strings_1.standardUnicodeHexEscape));
45
+ exports.stringEscape = Strings_1.utf16ConcatMap(Strings_1.escapeNonPrintableMapper(Strings_1.isAscii, Strings_1.standardUnicodeHexEscape));
70
46
  function isStartCharacter(codePoint) {
71
47
  if (codePoint === 0x5f)
72
48
  return true; // underscore
73
- return (0, Strings_1.isAscii)(codePoint) && (0, Strings_1.isLetter)(codePoint);
49
+ return Strings_1.isAscii(codePoint) && Strings_1.isLetter(codePoint);
74
50
  }
75
51
  function isPartCharacter(codePoint) {
76
- return isStartCharacter(codePoint) || ((0, Strings_1.isAscii)(codePoint) && (0, Strings_1.isDigit)(codePoint));
52
+ return isStartCharacter(codePoint) || (Strings_1.isAscii(codePoint) && Strings_1.isDigit(codePoint));
77
53
  }
78
- const legalizeName = (0, Strings_1.utf16LegalizeCharacters)(isPartCharacter);
54
+ const legalizeName = Strings_1.utf16LegalizeCharacters(isPartCharacter);
79
55
  function phpNameStyle(startWithUpper, upperUnderscore, original, acronymsStyle = Strings_1.allUpperWordStyle) {
80
- const words = (0, Strings_1.splitIntoWords)(original);
81
- return (0, Strings_1.combineWords)(words, legalizeName, upperUnderscore ? Strings_1.allUpperWordStyle : startWithUpper ? Strings_1.firstUpperWordStyle : Strings_1.allLowerWordStyle, upperUnderscore ? Strings_1.allUpperWordStyle : Strings_1.firstUpperWordStyle, upperUnderscore || startWithUpper ? Strings_1.allUpperWordStyle : Strings_1.allLowerWordStyle, acronymsStyle, upperUnderscore ? "_" : "", isStartCharacter);
56
+ const words = Strings_1.splitIntoWords(original);
57
+ return Strings_1.combineWords(words, legalizeName, upperUnderscore ? Strings_1.allUpperWordStyle : startWithUpper ? Strings_1.firstUpperWordStyle : Strings_1.allLowerWordStyle, upperUnderscore ? Strings_1.allUpperWordStyle : Strings_1.firstUpperWordStyle, upperUnderscore || startWithUpper ? Strings_1.allUpperWordStyle : Strings_1.allLowerWordStyle, acronymsStyle, upperUnderscore ? "_" : "", isStartCharacter);
82
58
  }
83
59
  exports.phpNameStyle = phpNameStyle;
84
60
  class PhpRenderer extends ConvenienceRenderer_1.ConvenienceRenderer {
85
- _options;
86
- _gettersAndSettersForPropertyName = new Map();
87
- _haveEmittedLeadingComments = false;
88
- _converterClassname = "Converter";
89
- _converterKeywords = [];
90
61
  constructor(targetLanguage, renderContext, _options) {
91
62
  super(targetLanguage, renderContext);
92
63
  this._options = _options;
64
+ this._gettersAndSettersForPropertyName = new Map();
65
+ this._haveEmittedLeadingComments = false;
66
+ this._converterClassname = "Converter";
67
+ this._converterKeywords = [];
93
68
  }
94
69
  forbiddenForObjectProperties(_c, _className) {
95
70
  return { names: [], includeGlobalForbidden: true };
@@ -107,10 +82,10 @@ class PhpRenderer extends ConvenienceRenderer_1.ConvenienceRenderer {
107
82
  return this.getNameStyling("enumCaseNamingFunction");
108
83
  }
109
84
  unionNeedsName(u) {
110
- return (0, TypeUtils_1.nullableFromUnion)(u) === null;
85
+ return TypeUtils_1.nullableFromUnion(u) === null;
111
86
  }
112
87
  namedTypeToNameForTopLevel(type) {
113
- return (0, TypeUtils_1.directlyReachableSingleNamedType)(type);
88
+ return TypeUtils_1.directlyReachableSingleNamedType(type);
114
89
  }
115
90
  makeNamesForPropertyGetterAndSetter(_c, _className, _p, _jsonName, name) {
116
91
  const getterName = new Naming_1.DependencyName(this.getNameStyling("propertyNamingFunction"), name.order, lookup => `get_${lookup(name)}`);
@@ -142,9 +117,9 @@ class PhpRenderer extends ConvenienceRenderer_1.ConvenienceRenderer {
142
117
  }
143
118
  getNameStyling(convention) {
144
119
  const styling = {
145
- typeNamingFunction: (0, Naming_1.funPrefixNamer)("types", n => phpNameStyle(true, false, n, (0, Acronyms_1.acronymStyle)(this._options.acronymStyle))),
146
- propertyNamingFunction: (0, Naming_1.funPrefixNamer)("properties", n => phpNameStyle(false, false, n, (0, Acronyms_1.acronymStyle)(this._options.acronymStyle))),
147
- enumCaseNamingFunction: (0, Naming_1.funPrefixNamer)("enum-cases", n => phpNameStyle(true, true, n, (0, Acronyms_1.acronymStyle)(this._options.acronymStyle)))
120
+ typeNamingFunction: Naming_1.funPrefixNamer("types", n => phpNameStyle(true, false, n, Acronyms_1.acronymStyle(this._options.acronymStyle))),
121
+ propertyNamingFunction: Naming_1.funPrefixNamer("properties", n => phpNameStyle(false, false, n, Acronyms_1.acronymStyle(this._options.acronymStyle))),
122
+ enumCaseNamingFunction: Naming_1.funPrefixNamer("enum-cases", n => phpNameStyle(true, true, n, Acronyms_1.acronymStyle(this._options.acronymStyle)))
148
123
  };
149
124
  return styling[convention];
150
125
  }
@@ -176,8 +151,8 @@ class PhpRenderer extends ConvenienceRenderer_1.ConvenienceRenderer {
176
151
  function optionalize(s) {
177
152
  return [isOptional ? prefix : "", s, isOptional ? suffix : ""];
178
153
  }
179
- return (0, TypeUtils_1.matchType)(t, _anyType => (0, Source_1.maybeAnnotated)(isOptional, Annotation_1.anyTypeIssueAnnotation, "Object"), _nullType => (0, Source_1.maybeAnnotated)(isOptional, Annotation_1.nullTypeIssueAnnotation, "Object"), _boolType => optionalize("bool"), _integerType => optionalize("int"), _doubleType => optionalize("float"), _stringType => optionalize("string"), _arrayType => optionalize("array"), classType => optionalize(this.nameForNamedType(classType)), _mapType => optionalize("stdClass"), enumType => optionalize(this.nameForNamedType(enumType)), unionType => {
180
- const nullable = (0, TypeUtils_1.nullableFromUnion)(unionType);
154
+ return TypeUtils_1.matchType(t, _anyType => Source_1.maybeAnnotated(isOptional, Annotation_1.anyTypeIssueAnnotation, "Object"), _nullType => Source_1.maybeAnnotated(isOptional, Annotation_1.nullTypeIssueAnnotation, "Object"), _boolType => optionalize("bool"), _integerType => optionalize("int"), _doubleType => optionalize("float"), _stringType => optionalize("string"), _arrayType => optionalize("array"), classType => optionalize(this.nameForNamedType(classType)), _mapType => optionalize("stdClass"), enumType => optionalize(this.nameForNamedType(enumType)), unionType => {
155
+ const nullable = TypeUtils_1.nullableFromUnion(unionType);
181
156
  if (nullable !== null)
182
157
  return this.phpType(true, nullable, true, prefix, suffix);
183
158
  return this.nameForNamedType(unionType);
@@ -198,8 +173,8 @@ class PhpRenderer extends ConvenienceRenderer_1.ConvenienceRenderer {
198
173
  });
199
174
  }
200
175
  phpDocConvertType(className, t) {
201
- return (0, TypeUtils_1.matchType)(t, _anyType => "any", _nullType => "null", _boolType => "bool", _integerType => "int", _doubleType => "float", _stringType => "string", arrayType => [this.phpDocConvertType(className, arrayType.items), "[]"], _classType => _classType.getCombinedName(), _mapType => "stdClass", enumType => this.nameForNamedType(enumType), unionType => {
202
- const nullable = (0, TypeUtils_1.nullableFromUnion)(unionType);
176
+ return TypeUtils_1.matchType(t, _anyType => "any", _nullType => "null", _boolType => "bool", _integerType => "int", _doubleType => "float", _stringType => "string", arrayType => [this.phpDocConvertType(className, arrayType.items), "[]"], _classType => _classType.getCombinedName(), _mapType => "stdClass", enumType => this.nameForNamedType(enumType), unionType => {
177
+ const nullable = TypeUtils_1.nullableFromUnion(unionType);
203
178
  if (nullable !== null) {
204
179
  return [this.phpDocConvertType(className, nullable), "|null"];
205
180
  }
@@ -212,10 +187,10 @@ class PhpRenderer extends ConvenienceRenderer_1.ConvenienceRenderer {
212
187
  });
213
188
  }
214
189
  phpConvertType(className, t) {
215
- return (0, TypeUtils_1.matchType)(t, _anyType => "any", _nullType => "null", _boolType => "bool", _integerType => "int", _doubleType => "float", _stringType => "string", _arrayType => "array", _classType => "stdClass", _mapType => "stdClass", _enumType => "string", // TODO number this.nameForNamedType(enumType),
190
+ return TypeUtils_1.matchType(t, _anyType => "any", _nullType => "null", _boolType => "bool", _integerType => "int", _doubleType => "float", _stringType => "string", _arrayType => "array", _classType => "stdClass", _mapType => "stdClass", _enumType => "string", // TODO number this.nameForNamedType(enumType),
216
191
  // TODO number this.nameForNamedType(enumType),
217
192
  unionType => {
218
- const nullable = (0, TypeUtils_1.nullableFromUnion)(unionType);
193
+ const nullable = TypeUtils_1.nullableFromUnion(unionType);
219
194
  if (nullable !== null) {
220
195
  return ["?", this.phpConvertType(className, nullable)];
221
196
  }
@@ -228,7 +203,7 @@ class PhpRenderer extends ConvenienceRenderer_1.ConvenienceRenderer {
228
203
  });
229
204
  }
230
205
  phpToObjConvert(className, t, lhs, args) {
231
- return (0, TypeUtils_1.matchType)(t, _anyType => this.emitLine(...lhs, ...args, "; /*any*/"), _nullType => this.emitLine(...lhs, ...args, "; /*null*/"), _boolType => this.emitLine(...lhs, ...args, "; /*bool*/"), _integerType => this.emitLine(...lhs, ...args, "; /*int*/"), _doubleType => this.emitLine(...lhs, ...args, "; /*float*/"), _stringType => this.emitLine(...lhs, ...args, "; /*string*/"), arrayType => {
206
+ return TypeUtils_1.matchType(t, _anyType => this.emitLine(...lhs, ...args, "; /*any*/"), _nullType => this.emitLine(...lhs, ...args, "; /*null*/"), _boolType => this.emitLine(...lhs, ...args, "; /*bool*/"), _integerType => this.emitLine(...lhs, ...args, "; /*int*/"), _doubleType => this.emitLine(...lhs, ...args, "; /*float*/"), _stringType => this.emitLine(...lhs, ...args, "; /*string*/"), arrayType => {
232
207
  this.emitLine(...lhs, "array_map(function ($value) {");
233
208
  this.indent(() => {
234
209
  this.phpToObjConvert(className, arrayType.items, ["return "], ["$value"]);
@@ -245,7 +220,7 @@ class PhpRenderer extends ConvenienceRenderer_1.ConvenienceRenderer {
245
220
  });
246
221
  this.emitLine("return to(", ...args, ");");
247
222
  }, enumType => this.emitLine(...lhs, this.nameForNamedType(enumType), "::to(", ...args, "); ", "/*enum*/"), unionType => {
248
- const nullable = (0, TypeUtils_1.nullableFromUnion)(unionType);
223
+ const nullable = TypeUtils_1.nullableFromUnion(unionType);
249
224
  if (nullable !== null) {
250
225
  this.emitLine("if (!is_null(", ...args, ")) {");
251
226
  this.indent(() => this.phpToObjConvert(className, nullable, lhs, args));
@@ -270,7 +245,7 @@ class PhpRenderer extends ConvenienceRenderer_1.ConvenienceRenderer {
270
245
  // }
271
246
  }
272
247
  phpFromObjConvert(className, t, lhs, args) {
273
- return (0, TypeUtils_1.matchType)(t, _anyType => this.emitLine(...lhs, ...args, "; /*any*/"), _nullType => this.emitLine(...lhs, ...args, "; /*null*/"), _boolType => this.emitLine(...lhs, ...args, "; /*bool*/"), _integerType => this.emitLine(...lhs, ...args, "; /*int*/"), _doubleType => this.emitLine(...lhs, ...args, "; /*float*/"), _stringType => this.emitLine(...lhs, ...args, "; /*string*/"), arrayType => {
248
+ return TypeUtils_1.matchType(t, _anyType => this.emitLine(...lhs, ...args, "; /*any*/"), _nullType => this.emitLine(...lhs, ...args, "; /*null*/"), _boolType => this.emitLine(...lhs, ...args, "; /*bool*/"), _integerType => this.emitLine(...lhs, ...args, "; /*int*/"), _doubleType => this.emitLine(...lhs, ...args, "; /*float*/"), _stringType => this.emitLine(...lhs, ...args, "; /*string*/"), arrayType => {
274
249
  this.emitLine(...lhs, " array_map(function ($value) {");
275
250
  this.indent(() => {
276
251
  this.phpFromObjConvert(className, arrayType.items, ["return "], ["$value"]);
@@ -287,7 +262,7 @@ class PhpRenderer extends ConvenienceRenderer_1.ConvenienceRenderer {
287
262
  });
288
263
  this.emitLine("return from(", ...args, ");");
289
264
  }, enumType => this.emitLine(...lhs, this.nameForNamedType(enumType), "::from(", ...args, "); ", "/*enum*/"), unionType => {
290
- const nullable = (0, TypeUtils_1.nullableFromUnion)(unionType);
265
+ const nullable = TypeUtils_1.nullableFromUnion(unionType);
291
266
  if (nullable !== null) {
292
267
  this.emitLine("if (!is_null(", ...args, ")) {");
293
268
  this.indent(() => this.phpFromObjConvert(className, nullable, lhs, args));
@@ -308,7 +283,7 @@ class PhpRenderer extends ConvenienceRenderer_1.ConvenienceRenderer {
308
283
  });
309
284
  }
310
285
  phpSampleConvert(className, t, lhs, args, idx, suffix) {
311
- return (0, TypeUtils_1.matchType)(t, _anyType => this.emitLine(...lhs, "'AnyType::", className, "::", args, "::" + idx, "'", suffix, "/*", "" + idx, ":", args, "*/"), _nullType => this.emitLine(...lhs, "null", suffix, " /*", "" + idx, ":", args, "*/"), _boolType => this.emitLine(...lhs, "true", suffix, " /*", "" + idx, ":", args, "*/"), _integerType => this.emitLine(...lhs, "" + idx, suffix, " /*", "" + idx, ":", args, "*/"), _doubleType => this.emitLine(...lhs, "" + (idx + idx / 1000), suffix, " /*", "" + idx, ":", args, "*/"), _stringType => this.emitLine(...lhs, "'", className, "::", args, "::" + idx, "'", suffix, " /*", "" + idx, ":", args, "*/"), arrayType => {
286
+ return TypeUtils_1.matchType(t, _anyType => this.emitLine(...lhs, "'AnyType::", className, "::", args, "::" + idx, "'", suffix, "/*", "" + idx, ":", args, "*/"), _nullType => this.emitLine(...lhs, "null", suffix, " /*", "" + idx, ":", args, "*/"), _boolType => this.emitLine(...lhs, "true", suffix, " /*", "" + idx, ":", args, "*/"), _integerType => this.emitLine(...lhs, "" + idx, suffix, " /*", "" + idx, ":", args, "*/"), _doubleType => this.emitLine(...lhs, "" + (idx + idx / 1000), suffix, " /*", "" + idx, ":", args, "*/"), _stringType => this.emitLine(...lhs, "'", className, "::", args, "::" + idx, "'", suffix, " /*", "" + idx, ":", args, "*/"), arrayType => {
312
287
  this.emitLine(...lhs, " array(");
313
288
  this.indent(() => {
314
289
  this.phpSampleConvert(className, arrayType.items, [], [], idx, "");
@@ -322,7 +297,7 @@ class PhpRenderer extends ConvenienceRenderer_1.ConvenienceRenderer {
322
297
  });
323
298
  this.emitLine("return sample();");
324
299
  }, enumType => this.emitLine(...lhs, this.nameForNamedType(enumType), "::sample()", suffix, " /*enum*/"), unionType => {
325
- const nullable = (0, TypeUtils_1.nullableFromUnion)(unionType);
300
+ const nullable = TypeUtils_1.nullableFromUnion(unionType);
326
301
  if (nullable !== null) {
327
302
  this.phpSampleConvert(className, nullable, lhs, args, idx, suffix);
328
303
  return;
@@ -342,7 +317,7 @@ class PhpRenderer extends ConvenienceRenderer_1.ConvenienceRenderer {
342
317
  const is = (isfn, myT = className) => {
343
318
  this.emitBlock(["if (!", isfn, "(", scopeAttrName, "))"], () => this.emitLine('throw new Exception("Attribute Error:', myT, "::", attrName, '");'));
344
319
  };
345
- return (0, TypeUtils_1.matchType)(t, _anyType => is("defined"), _nullType => is("is_null"), _boolType => is("is_bool"), _integerType => is("is_integer"), _doubleType => is("is_float"), _stringType => is("is_string"), arrayType => {
320
+ return TypeUtils_1.matchType(t, _anyType => is("defined"), _nullType => is("is_null"), _boolType => is("is_bool"), _integerType => is("is_integer"), _doubleType => is("is_float"), _stringType => is("is_string"), arrayType => {
346
321
  is("is_array");
347
322
  this.emitLine("array_walk(", scopeAttrName, ", function(", scopeAttrName, "_v) {");
348
323
  this.indent(() => {
@@ -360,7 +335,7 @@ class PhpRenderer extends ConvenienceRenderer_1.ConvenienceRenderer {
360
335
  }, enumType => {
361
336
  this.emitLine(this.phpType(false, enumType), "::to(", scopeAttrName, ");");
362
337
  }, unionType => {
363
- const nullable = (0, TypeUtils_1.nullableFromUnion)(unionType);
338
+ const nullable = TypeUtils_1.nullableFromUnion(unionType);
364
339
  if (nullable !== null) {
365
340
  this.emitBlock(["if (!is_null(", scopeAttrName, "))"], () => {
366
341
  this.phpValidate(className, nullable, attrName, scopeAttrName);
@@ -511,7 +486,7 @@ class PhpRenderer extends ConvenienceRenderer_1.ConvenienceRenderer {
511
486
  let idx = 31;
512
487
  this.forEachClassProperty(c, "leading-and-interposing", (name, jsonName, p) => {
513
488
  const desc = this.descriptionForClassProperty(c, jsonName);
514
- const names = (0, Support_1.defined)(this._gettersAndSettersForPropertyName.get(name));
489
+ const names = Support_1.defined(this._gettersAndSettersForPropertyName.get(name));
515
490
  this.ensureBlankLine();
516
491
  this.emitFromMethod(names, p, className, name, desc);
517
492
  this.ensureBlankLine();
@@ -530,7 +505,7 @@ class PhpRenderer extends ConvenienceRenderer_1.ConvenienceRenderer {
530
505
  let lines = [];
531
506
  let p = "return ";
532
507
  this.forEachClassProperty(c, "none", (name, _jsonName, _p) => {
533
- const names = (0, Support_1.defined)(this._gettersAndSettersForPropertyName.get(name));
508
+ const names = Support_1.defined(this._gettersAndSettersForPropertyName.get(name));
534
509
  lines.push([p, className, "::", names.validate, "($this->", name, ")"]);
535
510
  p = "|| ";
536
511
  });
@@ -548,7 +523,7 @@ class PhpRenderer extends ConvenienceRenderer_1.ConvenienceRenderer {
548
523
  ], () => {
549
524
  this.emitLine("$out = new stdClass();");
550
525
  this.forEachClassProperty(c, "none", (name, jsonName) => {
551
- const names = (0, Support_1.defined)(this._gettersAndSettersForPropertyName.get(name));
526
+ const names = Support_1.defined(this._gettersAndSettersForPropertyName.get(name));
552
527
  this.emitLine("$out->{'", jsonName, "'} = $this->", names.to, "();");
553
528
  });
554
529
  this.emitLine("return $out;");
@@ -567,14 +542,14 @@ class PhpRenderer extends ConvenienceRenderer_1.ConvenienceRenderer {
567
542
  ], () => {
568
543
  if (this._options.fastGet) {
569
544
  this.forEachClassProperty(c, "none", name => {
570
- const names = (0, Support_1.defined)(this._gettersAndSettersForPropertyName.get(name));
545
+ const names = Support_1.defined(this._gettersAndSettersForPropertyName.get(name));
571
546
  this.emitLine(className, "::", names.validate, "($this->", name, ", true);");
572
547
  });
573
548
  }
574
549
  this.emitLine("return new ", className, "(");
575
550
  let comma = " ";
576
551
  this.forEachClassProperty(c, "none", (name, jsonName) => {
577
- const names = (0, Support_1.defined)(this._gettersAndSettersForPropertyName.get(name));
552
+ const names = Support_1.defined(this._gettersAndSettersForPropertyName.get(name));
578
553
  this.emitLine(comma, className, "::", names.from, "($obj->{'", jsonName, "'})");
579
554
  comma = ",";
580
555
  });
@@ -585,7 +560,7 @@ class PhpRenderer extends ConvenienceRenderer_1.ConvenienceRenderer {
585
560
  this.emitLine("return new ", className, "(");
586
561
  let comma = " ";
587
562
  this.forEachClassProperty(c, "none", name => {
588
- const names = (0, Support_1.defined)(this._gettersAndSettersForPropertyName.get(name));
563
+ const names = Support_1.defined(this._gettersAndSettersForPropertyName.get(name));
589
564
  this.emitLine(comma, className, "::", names.sample, "()");
590
565
  comma = ",";
591
566
  });
@@ -649,7 +624,7 @@ class PhpRenderer extends ConvenienceRenderer_1.ConvenienceRenderer {
649
624
  this.indent(() => {
650
625
  this.forEachEnumCase(e, "none", (name, jsonName) => {
651
626
  // Todo String or Number
652
- this.emitLine("case ", enumName, "::$", name, "->enum: return '", (0, exports.stringEscape)(jsonName), "';");
627
+ this.emitLine("case ", enumName, "::$", name, "->enum: return '", exports.stringEscape(jsonName), "';");
653
628
  });
654
629
  });
655
630
  this.emitLine("}");
@@ -672,7 +647,7 @@ class PhpRenderer extends ConvenienceRenderer_1.ConvenienceRenderer {
672
647
  this.indent(() => {
673
648
  this.forEachEnumCase(e, "none", (name, jsonName) => {
674
649
  // Todo String or Enum
675
- this.emitLine("case '", (0, exports.stringEscape)(jsonName), "': return ", enumName, "::$", name, ";");
650
+ this.emitLine("case '", exports.stringEscape(jsonName), "': return ", enumName, "::$", name, ";");
676
651
  });
677
652
  });
678
653
  this.emitLine("}");
@@ -696,7 +671,7 @@ class PhpRenderer extends ConvenienceRenderer_1.ConvenienceRenderer {
696
671
  if (this._options.withClosing) {
697
672
  this.emitLine("?>");
698
673
  }
699
- super.finishFile((0, Support_1.defined)(givenFilename));
674
+ super.finishFile(Support_1.defined(givenFilename));
700
675
  }
701
676
  }
702
677
  exports.PhpRenderer = PhpRenderer;
@@ -13,7 +13,7 @@ export declare class PikeTargetLanguage extends TargetLanguage {
13
13
  }
14
14
  export declare class PikeRenderer extends ConvenienceRenderer {
15
15
  protected emitSourceStructure(): void;
16
- protected get enumCasesInGlobalNamespace(): boolean;
16
+ protected readonly enumCasesInGlobalNamespace: boolean;
17
17
  protected makeEnumCaseNamer(): Namer;
18
18
  protected makeNamedTypeNamer(): Namer;
19
19
  protected makeUnionMemberNamer(): Namer;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PikeRenderer = exports.PikeTargetLanguage = exports.pikeOptions = void 0;
4
3
  const ConvenienceRenderer_1 = require("../ConvenienceRenderer");
5
4
  const Naming_1 = require("../Naming");
6
5
  const Source_1 = require("../Source");
@@ -63,10 +62,10 @@ const keywords = [
63
62
  "typeof",
64
63
  "global"
65
64
  ];
66
- const legalizeName = (0, Strings_1.legalizeCharacters)(Strings_1.isLetterOrUnderscoreOrDigit);
67
- const enumNamingFunction = (0, Naming_1.funPrefixNamer)("enumNamer", (0, Strings_1.makeNameStyle)("upper-underscore", legalizeName));
68
- const namingFunction = (0, Naming_1.funPrefixNamer)("genericNamer", (0, Strings_1.makeNameStyle)("underscore", legalizeName));
69
- const namedTypeNamingFunction = (0, Naming_1.funPrefixNamer)("typeNamer", (0, Strings_1.makeNameStyle)("pascal", legalizeName));
65
+ const legalizeName = Strings_1.legalizeCharacters(Strings_1.isLetterOrUnderscoreOrDigit);
66
+ const enumNamingFunction = Naming_1.funPrefixNamer("enumNamer", Strings_1.makeNameStyle("upper-underscore", legalizeName));
67
+ const namingFunction = Naming_1.funPrefixNamer("genericNamer", Strings_1.makeNameStyle("underscore", legalizeName));
68
+ const namedTypeNamingFunction = Naming_1.funPrefixNamer("typeNamer", Strings_1.makeNameStyle("pascal", legalizeName));
70
69
  class PikeTargetLanguage extends TargetLanguage_1.TargetLanguage {
71
70
  constructor() {
72
71
  super("Pike", ["pike", "pikelang"], "pmod");
@@ -121,20 +120,20 @@ class PikeRenderer extends ConvenienceRenderer_1.ConvenienceRenderer {
121
120
  }
122
121
  sourceFor(t) {
123
122
  if (["class", "object", "enum"].indexOf(t.kind) >= 0) {
124
- return (0, Source_1.singleWord)(this.nameForNamedType(t));
123
+ return Source_1.singleWord(this.nameForNamedType(t));
125
124
  }
126
- return (0, TypeUtils_1.matchType)(t, _anyType => (0, Source_1.singleWord)("mixed"), _nullType => (0, Source_1.singleWord)("mixed"), _boolType => (0, Source_1.singleWord)("bool"), _integerType => (0, Source_1.singleWord)("int"), _doubleType => (0, Source_1.singleWord)("float"), _stringType => (0, Source_1.singleWord)("string"), arrayType => (0, Source_1.singleWord)(["array(", this.sourceFor(arrayType.items).source, ")"]), _classType => (0, Source_1.singleWord)(this.nameForNamedType(_classType)), mapType => {
125
+ return TypeUtils_1.matchType(t, _anyType => Source_1.singleWord("mixed"), _nullType => Source_1.singleWord("mixed"), _boolType => Source_1.singleWord("bool"), _integerType => Source_1.singleWord("int"), _doubleType => Source_1.singleWord("float"), _stringType => Source_1.singleWord("string"), arrayType => Source_1.singleWord(["array(", this.sourceFor(arrayType.items).source, ")"]), _classType => Source_1.singleWord(this.nameForNamedType(_classType)), mapType => {
127
126
  let valueSource;
128
127
  const v = mapType.values;
129
128
  valueSource = this.sourceFor(v).source;
130
- return (0, Source_1.singleWord)(["mapping(string:", valueSource, ")"]);
131
- }, _enumType => (0, Source_1.singleWord)("enum"), unionType => {
132
- if ((0, TypeUtils_1.nullableFromUnion)(unionType) !== null) {
133
- const children = Array.from(unionType.getChildren()).map(c => (0, Source_1.parenIfNeeded)(this.sourceFor(c)));
134
- return (0, Source_1.multiWord)("|", ...children);
129
+ return Source_1.singleWord(["mapping(string:", valueSource, ")"]);
130
+ }, _enumType => Source_1.singleWord("enum"), unionType => {
131
+ if (TypeUtils_1.nullableFromUnion(unionType) !== null) {
132
+ const children = Array.from(unionType.getChildren()).map(c => Source_1.parenIfNeeded(this.sourceFor(c)));
133
+ return Source_1.multiWord("|", ...children);
135
134
  }
136
135
  else {
137
- return (0, Source_1.singleWord)(this.nameForNamedType(unionType));
136
+ return Source_1.singleWord(this.nameForNamedType(unionType));
138
137
  }
139
138
  });
140
139
  }
@@ -153,7 +152,7 @@ class PikeRenderer extends ConvenienceRenderer_1.ConvenienceRenderer {
153
152
  let table = [];
154
153
  this.forEachEnumCase(e, "none", (name, jsonName) => {
155
154
  table.push([
156
- [name, ' = "', (0, Strings_1.stringEscape)(jsonName), '", '],
155
+ [name, ' = "', Strings_1.stringEscape(jsonName), '", '],
157
156
  ['// json: "', jsonName, '"']
158
157
  ]);
159
158
  });
@@ -161,12 +160,12 @@ class PikeRenderer extends ConvenienceRenderer_1.ConvenienceRenderer {
161
160
  });
162
161
  }
163
162
  emitUnion(u, unionName) {
164
- const isMaybeWithSingleType = (0, TypeUtils_1.nullableFromUnion)(u);
163
+ const isMaybeWithSingleType = TypeUtils_1.nullableFromUnion(u);
165
164
  if (isMaybeWithSingleType !== null) {
166
165
  return;
167
166
  }
168
167
  this.emitDescription(this.descriptionForType(u));
169
- const [, nonNulls] = (0, TypeUtils_1.removeNullFromUnion)(u);
168
+ const [, nonNulls] = TypeUtils_1.removeNullFromUnion(u);
170
169
  let types = [];
171
170
  this.forEachUnionMember(u, nonNulls, "none", null, (_name, t) => {
172
171
  const pikeType = this.sourceFor(t).source;
@@ -254,7 +253,7 @@ class PikeRenderer extends ConvenienceRenderer_1.ConvenienceRenderer {
254
253
  this.emitBlock(["string encode_json()"], () => {
255
254
  this.emitMappingBlock(["mapping(string:mixed) json = "], () => {
256
255
  this.forEachClassProperty(c, "none", (name, jsonName) => {
257
- this.emitLine(['"', (0, Strings_1.stringEscape)(jsonName), '" : ', name, ","]);
256
+ this.emitLine(['"', Strings_1.stringEscape(jsonName), '" : ', name, ","]);
258
257
  });
259
258
  });
260
259
  this.ensureBlankLine();
@@ -266,7 +265,7 @@ class PikeRenderer extends ConvenienceRenderer_1.ConvenienceRenderer {
266
265
  this.emitLine([className, " retval = ", className, "();"]);
267
266
  this.ensureBlankLine();
268
267
  this.forEachClassProperty(c, "none", (name, jsonName) => {
269
- this.emitLine(["retval.", name, ' = json["', (0, Strings_1.stringEscape)(jsonName), '"];']);
268
+ this.emitLine(["retval.", name, ' = json["', Strings_1.stringEscape(jsonName), '"];']);
270
269
  });
271
270
  this.ensureBlankLine();
272
271
  this.emitLine(["return retval;"]);
@@ -7,7 +7,7 @@ import { ConvenienceRenderer, ForbiddenWordsInfo } from "../ConvenienceRenderer"
7
7
  import { Namer, Name, DependencyName } from "../Naming";
8
8
  import { Sourcelike, MultiWord } from "../Source";
9
9
  import { Transformer } from "../Transformers";
10
- export type PythonFeatures = {
10
+ export declare type PythonFeatures = {
11
11
  typeHints: boolean;
12
12
  dataClasses: boolean;
13
13
  };
@@ -18,9 +18,9 @@ export declare const pythonOptions: {
18
18
  };
19
19
  export declare class PythonTargetLanguage extends TargetLanguage {
20
20
  protected getOptions(): Option<any>[];
21
- get stringTypeMapping(): StringTypeMapping;
22
- get supportsUnionsWithBothNumberTypes(): boolean;
23
- get supportsOptionalClassProperties(): boolean;
21
+ readonly stringTypeMapping: StringTypeMapping;
22
+ readonly supportsUnionsWithBothNumberTypes: boolean;
23
+ readonly supportsOptionalClassProperties: boolean;
24
24
  needsTransformerForType(t: Type): boolean;
25
25
  protected makeRenderer(renderContext: RenderContext, untypedOptionValues: {
26
26
  [name: string]: any;
@@ -37,9 +37,9 @@ export declare class PythonRenderer extends ConvenienceRenderer {
37
37
  protected namerForObjectProperty(): Namer;
38
38
  protected makeUnionMemberNamer(): null;
39
39
  protected makeEnumCaseNamer(): Namer;
40
- protected get commentLineStart(): string;
40
+ protected readonly commentLineStart: string;
41
41
  protected emitDescriptionBlock(lines: Sourcelike[]): void;
42
- protected get needsTypeDeclarationBeforeUse(): boolean;
42
+ protected readonly needsTypeDeclarationBeforeUse: boolean;
43
43
  protected canBeForwardDeclared(t: Type): boolean;
44
44
  protected emitBlock(line: Sourcelike, f: () => void): void;
45
45
  protected string(s: string): Sourcelike;
@@ -61,8 +61,8 @@ export declare class PythonRenderer extends ConvenienceRenderer {
61
61
  protected emitClosingCode(): void;
62
62
  protected emitSourceStructure(_givenOutputFilename: string): void;
63
63
  }
64
- export type ConverterFunction = "none" | "bool" | "int" | "from-float" | "to-float" | "str" | "to-enum" | "list" | "to-class" | "dict" | "union" | "from-datetime" | "from-stringified-bool" | "is-type";
65
- export type ValueOrLambda = {
64
+ export declare type ConverterFunction = "none" | "bool" | "int" | "from-float" | "to-float" | "str" | "to-enum" | "list" | "to-class" | "dict" | "union" | "from-datetime" | "from-stringified-bool" | "is-type";
65
+ export declare type ValueOrLambda = {
66
66
  value: Sourcelike | undefined;
67
67
  lambda?: MultiWord;
68
68
  };