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
@@ -1,5 +1,5 @@
1
1
  import { StringMap } from "../support/Support";
2
- export type JSONSchema = StringMap | boolean;
2
+ export declare type JSONSchema = StringMap | boolean;
3
3
  export declare abstract class JSONSchemaStore {
4
4
  private readonly _schemas;
5
5
  private add;
@@ -1,36 +1,47 @@
1
1
  "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
2
10
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.JSONSchemaStore = void 0;
4
11
  const Support_1 = require("../support/Support");
5
12
  class JSONSchemaStore {
6
- _schemas = new Map();
13
+ constructor() {
14
+ this._schemas = new Map();
15
+ }
7
16
  add(address, schema) {
8
- (0, Support_1.assert)(!this._schemas.has(address), "Cannot set a schema for an address twice");
17
+ Support_1.assert(!this._schemas.has(address), "Cannot set a schema for an address twice");
9
18
  this._schemas.set(address, schema);
10
19
  }
11
- async get(address, debugPrint) {
12
- let schema = this._schemas.get(address);
13
- if (schema !== undefined) {
14
- return schema;
15
- }
16
- if (debugPrint) {
17
- console.log(`trying to fetch ${address}`);
18
- }
19
- try {
20
- schema = await this.fetch(address);
21
- }
22
- catch { }
23
- if (schema === undefined) {
20
+ get(address, debugPrint) {
21
+ return __awaiter(this, void 0, void 0, function* () {
22
+ let schema = this._schemas.get(address);
23
+ if (schema !== undefined) {
24
+ return schema;
25
+ }
26
+ if (debugPrint) {
27
+ console.log(`trying to fetch ${address}`);
28
+ }
29
+ try {
30
+ schema = yield this.fetch(address);
31
+ }
32
+ catch (_a) { }
33
+ if (schema === undefined) {
34
+ if (debugPrint) {
35
+ console.log(`couldn't fetch ${address}`);
36
+ }
37
+ return undefined;
38
+ }
24
39
  if (debugPrint) {
25
- console.log(`couldn't fetch ${address}`);
40
+ console.log(`successully fetched ${address}`);
26
41
  }
27
- return undefined;
28
- }
29
- if (debugPrint) {
30
- console.log(`successully fetched ${address}`);
31
- }
32
- this.add(address, schema);
33
- return schema;
42
+ this.add(address, schema);
43
+ return schema;
44
+ });
34
45
  }
35
46
  }
36
47
  exports.JSONSchemaStore = JSONSchemaStore;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.sourcesFromPostmanCollection = void 0;
4
3
  const Support_1 = require("../support/Support");
5
4
  function isValidJSON(s) {
6
5
  try {
@@ -49,7 +48,7 @@ function sourcesFromPostmanCollection(collectionJSON, collectionJSONAddress) {
49
48
  }
50
49
  }
51
50
  }
52
- processCollection((0, Support_1.parseJSON)(collectionJSON, "Postman collection", collectionJSONAddress));
51
+ processCollection(Support_1.parseJSON(collectionJSON, "Postman collection", collectionJSONAddress));
53
52
  const joinedDescription = descriptions.join("\n\n").trim();
54
53
  let description = undefined;
55
54
  if (joinedDescription !== "") {
@@ -1,33 +1,16 @@
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;
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
24
9
  };
25
10
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.readFromFileOrURL = exports.readableFromFileOrURL = void 0;
27
- const fs = __importStar(require("fs"));
11
+ const fs = require("fs");
28
12
  const browser_or_node_1 = require("browser-or-node");
29
13
  const get_stream_1 = require("./get-stream");
30
- const ts_necessities_1 = require("@glideapps/ts-necessities");
31
14
  const index_1 = require("../../index");
32
15
  // The typings for this module are screwy
33
16
  const isURL = require("is-url");
@@ -40,7 +23,7 @@ function parseHeaders(httpHeaders) {
40
23
  if (httpHeader !== undefined && httpHeader.length > 0) {
41
24
  const split = httpHeader.indexOf(":");
42
25
  if (split < 0) {
43
- return (0, index_1.panic)(`Could not parse HTTP header "${httpHeader}".`);
26
+ return index_1.panic(`Could not parse HTTP header "${httpHeader}".`);
44
27
  }
45
28
  const key = httpHeader.slice(0, split).trim();
46
29
  const value = httpHeader.slice(split + 1).trim();
@@ -49,39 +32,45 @@ function parseHeaders(httpHeaders) {
49
32
  return result;
50
33
  }, {});
51
34
  }
52
- async function readableFromFileOrURL(fileOrURL, httpHeaders) {
53
- try {
54
- if (isURL(fileOrURL)) {
55
- const response = await fetch(fileOrURL, {
56
- headers: parseHeaders(httpHeaders)
57
- });
58
- return response.body;
59
- }
60
- else if (browser_or_node_1.isNode) {
61
- if (fileOrURL === "-") {
62
- // Cast node readable to isomorphic readable from readable-stream
63
- return process.stdin;
35
+ function readableFromFileOrURL(fileOrURL, httpHeaders) {
36
+ return __awaiter(this, void 0, void 0, function* () {
37
+ try {
38
+ if (isURL(fileOrURL)) {
39
+ const response = yield fetch(fileOrURL, {
40
+ headers: parseHeaders(httpHeaders)
41
+ });
42
+ return response.body;
64
43
  }
65
- const filePath = fs.lstatSync(fileOrURL).isSymbolicLink() ? fs.readlinkSync(fileOrURL) : fileOrURL;
66
- if (fs.existsSync(filePath)) {
67
- // Cast node readable to isomorphic readable from readable-stream
68
- return fs.createReadStream(filePath, "utf8");
44
+ else if (browser_or_node_1.isNode) {
45
+ if (fileOrURL === "-") {
46
+ // Cast node readable to isomorphic readable from readable-stream
47
+ return process.stdin;
48
+ }
49
+ const filePath = fs.lstatSync(fileOrURL).isSymbolicLink() ? fs.readlinkSync(fileOrURL) : fileOrURL;
50
+ if (fs.existsSync(filePath)) {
51
+ // Cast node readable to isomorphic readable from readable-stream
52
+ return fs.createReadStream(filePath, "utf8");
53
+ }
69
54
  }
70
55
  }
71
- }
72
- catch (e) {
73
- return (0, index_1.messageError)("MiscReadError", { fileOrURL, message: (0, ts_necessities_1.exceptionToString)(e) });
74
- }
75
- return (0, index_1.messageError)("DriverInputFileDoesNotExist", { filename: fileOrURL });
56
+ catch (e) {
57
+ const message = typeof e.message === "string" ? e.message : "Unknown error";
58
+ return index_1.messageError("MiscReadError", { fileOrURL, message });
59
+ }
60
+ return index_1.messageError("DriverInputFileDoesNotExist", { filename: fileOrURL });
61
+ });
76
62
  }
77
63
  exports.readableFromFileOrURL = readableFromFileOrURL;
78
- async function readFromFileOrURL(fileOrURL, httpHeaders) {
79
- const readable = await readableFromFileOrURL(fileOrURL, httpHeaders);
80
- try {
81
- return await (0, get_stream_1.getStream)(readable);
82
- }
83
- catch (e) {
84
- return (0, index_1.messageError)("MiscReadError", { fileOrURL, message: (0, ts_necessities_1.exceptionToString)(e) });
85
- }
64
+ function readFromFileOrURL(fileOrURL, httpHeaders) {
65
+ return __awaiter(this, void 0, void 0, function* () {
66
+ const readable = yield readableFromFileOrURL(fileOrURL, httpHeaders);
67
+ try {
68
+ return yield get_stream_1.getStream(readable);
69
+ }
70
+ catch (e) {
71
+ const message = typeof e.message === "string" ? e.message : "Unknown error";
72
+ return index_1.messageError("MiscReadError", { fileOrURL, message });
73
+ }
74
+ });
86
75
  }
87
76
  exports.readFromFileOrURL = readFromFileOrURL;
@@ -1,10 +1,6 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.array = exports.buffer = exports.getStream = void 0;
7
- const buffer_stream_1 = __importDefault(require("./buffer-stream"));
3
+ const buffer_stream_1 = require("./buffer-stream");
8
4
  function getStream(inputStream, opts = {}) {
9
5
  if (!inputStream) {
10
6
  return Promise.reject(new Error("Expected a stream"));
@@ -21,7 +17,7 @@ function getStream(inputStream, opts = {}) {
21
17
  }
22
18
  reject(err);
23
19
  };
24
- stream = (0, buffer_stream_1.default)(opts);
20
+ stream = buffer_stream_1.default(opts);
25
21
  inputStream.once("error", error);
26
22
  inputStream.pipe(stream);
27
23
  stream.on("data", () => {
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.languageNamed = exports.all = void 0;
4
3
  const collection_utils_1 = require("collection-utils");
5
4
  const CSharp_1 = require("./CSharp");
6
5
  const Golang_1 = require("./Golang");
@@ -49,9 +48,9 @@ function languageNamed(name, targetLanguages) {
49
48
  if (targetLanguages === undefined) {
50
49
  targetLanguages = exports.all;
51
50
  }
52
- const maybeTargetLanguage = (0, collection_utils_1.iterableFind)(targetLanguages, l => l.names.indexOf(name) >= 0 || l.displayName === name);
51
+ const maybeTargetLanguage = collection_utils_1.iterableFind(targetLanguages, l => l.names.indexOf(name) >= 0 || l.displayName === name);
53
52
  if (maybeTargetLanguage !== undefined)
54
53
  return maybeTargetLanguage;
55
- return (0, collection_utils_1.iterableFind)(targetLanguages, l => l.extension === name);
54
+ return collection_utils_1.iterableFind(targetLanguages, l => l.extension === name);
56
55
  }
57
56
  exports.languageNamed = languageNamed;
@@ -26,8 +26,8 @@ export declare const cPlusPlusOptions: {
26
26
  export declare class CPlusPlusTargetLanguage extends TargetLanguage {
27
27
  constructor(displayName?: string, names?: string[], extension?: string);
28
28
  protected getOptions(): Option<any>[];
29
- get supportsUnionsWithBothNumberTypes(): boolean;
30
- get supportsOptionalClassProperties(): boolean;
29
+ readonly supportsUnionsWithBothNumberTypes: boolean;
30
+ readonly supportsOptionalClassProperties: boolean;
31
31
  protected makeRenderer(renderContext: RenderContext, untypedOptionValues: {
32
32
  [name: string]: any;
33
33
  }): CPlusPlusRenderer;
@@ -68,18 +68,18 @@ export declare enum MemberNames {
68
68
  GetPattern = 13,
69
69
  SetPattern = 14
70
70
  }
71
- type ConstraintMember = {
71
+ declare type ConstraintMember = {
72
72
  name: MemberNames;
73
73
  getter: MemberNames;
74
74
  setter: MemberNames;
75
75
  cppType: string;
76
76
  cppConstType?: string;
77
77
  };
78
- export type IncludeRecord = {
78
+ export declare type IncludeRecord = {
79
79
  kind: IncludeKind | undefined /** How to include that */;
80
80
  typeKind: TypeKind | undefined /** What exactly to include */;
81
81
  };
82
- export type TypeRecord = {
82
+ export declare type TypeRecord = {
83
83
  name: Name;
84
84
  type: Type;
85
85
  level: number;
@@ -90,8 +90,8 @@ export type TypeRecord = {
90
90
  * We map each and every unique type to a include kind, e.g. how
91
91
  * to include the given type
92
92
  */
93
- export type IncludeMap = Map<string, IncludeRecord>;
94
- export type TypeContext = {
93
+ export declare type IncludeMap = Map<string, IncludeRecord>;
94
+ export declare type TypeContext = {
95
95
  needsForwardIndirection: boolean;
96
96
  needsOptionalIndirection: boolean;
97
97
  inJsonNamespace: boolean;
@@ -146,7 +146,7 @@ export declare class CPlusPlusRenderer extends ConvenienceRenderer {
146
146
  protected emitInclude(global: boolean, name: Sourcelike): void;
147
147
  protected startFile(basename: Sourcelike, includeHelper?: boolean): void;
148
148
  protected finishFile(): void;
149
- protected get needsTypeDeclarationBeforeUse(): boolean;
149
+ protected readonly needsTypeDeclarationBeforeUse: boolean;
150
150
  protected canBeForwardDeclared(t: Type): boolean;
151
151
  protected emitDescriptionBlock(lines: Sourcelike[]): void;
152
152
  protected emitBlock(line: Sourcelike, withSemicolon: boolean, f: () => void, withIndent?: boolean): void;