graphql 16.14.0 → 16.14.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 (371) hide show
  1. package/error/GraphQLError.d.ts +151 -15
  2. package/error/GraphQLError.js +143 -12
  3. package/error/GraphQLError.mjs +143 -12
  4. package/error/index.d.ts +6 -0
  5. package/error/index.mjs +6 -0
  6. package/error/locatedError.d.ts +20 -0
  7. package/error/locatedError.js +21 -0
  8. package/error/locatedError.mjs +20 -0
  9. package/error/syntaxError.d.ts +15 -0
  10. package/error/syntaxError.js +16 -0
  11. package/error/syntaxError.mjs +15 -0
  12. package/execution/collectFields.js +6 -0
  13. package/execution/collectFields.mjs +6 -0
  14. package/execution/execute.d.ts +211 -12
  15. package/execution/execute.js +214 -23
  16. package/execution/execute.mjs +213 -23
  17. package/execution/index.d.ts +6 -0
  18. package/execution/index.mjs +6 -0
  19. package/execution/mapAsyncIterator.d.ts +2 -0
  20. package/execution/mapAsyncIterator.js +2 -0
  21. package/execution/mapAsyncIterator.mjs +2 -0
  22. package/execution/subscribe.d.ts +195 -5
  23. package/execution/subscribe.js +154 -11
  24. package/execution/subscribe.mjs +153 -11
  25. package/execution/values.d.ts +167 -10
  26. package/execution/values.js +149 -5
  27. package/execution/values.mjs +148 -5
  28. package/graphql.d.ts +163 -41
  29. package/graphql.js +126 -4
  30. package/graphql.mjs +131 -41
  31. package/index.d.ts +11 -17
  32. package/index.mjs +13 -19
  33. package/jsutils/Maybe.d.ts +5 -1
  34. package/jsutils/ObjMap.d.ts +4 -0
  35. package/jsutils/Path.d.ts +30 -0
  36. package/jsutils/Path.js +29 -0
  37. package/jsutils/Path.mjs +29 -0
  38. package/jsutils/PromiseOrValue.d.ts +1 -0
  39. package/jsutils/devAssert.d.ts +1 -0
  40. package/jsutils/devAssert.js +1 -0
  41. package/jsutils/devAssert.mjs +1 -0
  42. package/jsutils/didYouMean.d.ts +4 -1
  43. package/jsutils/didYouMean.js +4 -1
  44. package/jsutils/didYouMean.mjs +4 -1
  45. package/jsutils/groupBy.d.ts +2 -0
  46. package/jsutils/groupBy.js +2 -0
  47. package/jsutils/groupBy.mjs +2 -0
  48. package/jsutils/identityFunc.d.ts +2 -0
  49. package/jsutils/identityFunc.js +2 -0
  50. package/jsutils/identityFunc.mjs +2 -0
  51. package/jsutils/inspect.d.ts +2 -0
  52. package/jsutils/inspect.js +2 -0
  53. package/jsutils/inspect.mjs +2 -0
  54. package/jsutils/instanceOf.d.ts +2 -0
  55. package/jsutils/instanceOf.js +2 -0
  56. package/jsutils/instanceOf.mjs +2 -0
  57. package/jsutils/invariant.d.ts +1 -0
  58. package/jsutils/invariant.js +1 -0
  59. package/jsutils/invariant.mjs +1 -0
  60. package/jsutils/isAsyncIterable.d.ts +2 -0
  61. package/jsutils/isAsyncIterable.js +2 -0
  62. package/jsutils/isAsyncIterable.mjs +2 -0
  63. package/jsutils/isIterableObject.d.ts +6 -5
  64. package/jsutils/isIterableObject.js +6 -5
  65. package/jsutils/isIterableObject.mjs +6 -5
  66. package/jsutils/isObjectLike.d.ts +2 -0
  67. package/jsutils/isObjectLike.js +2 -0
  68. package/jsutils/isObjectLike.mjs +2 -0
  69. package/jsutils/isPromise.d.ts +2 -0
  70. package/jsutils/isPromise.js +2 -0
  71. package/jsutils/isPromise.mjs +2 -0
  72. package/jsutils/keyMap.d.ts +7 -14
  73. package/jsutils/keyMap.js +7 -14
  74. package/jsutils/keyMap.mjs +7 -14
  75. package/jsutils/keyValMap.d.ts +9 -6
  76. package/jsutils/keyValMap.js +9 -6
  77. package/jsutils/keyValMap.mjs +9 -6
  78. package/jsutils/mapValue.d.ts +2 -0
  79. package/jsutils/mapValue.js +2 -0
  80. package/jsutils/mapValue.mjs +2 -0
  81. package/jsutils/memoize3.d.ts +2 -0
  82. package/jsutils/memoize3.js +2 -0
  83. package/jsutils/memoize3.mjs +2 -0
  84. package/jsutils/naturalCompare.d.ts +2 -0
  85. package/jsutils/naturalCompare.js +2 -0
  86. package/jsutils/naturalCompare.mjs +2 -0
  87. package/jsutils/printPathArray.d.ts +2 -0
  88. package/jsutils/printPathArray.js +2 -0
  89. package/jsutils/printPathArray.mjs +2 -0
  90. package/jsutils/promiseForObject.d.ts +2 -0
  91. package/jsutils/promiseForObject.js +2 -0
  92. package/jsutils/promiseForObject.mjs +2 -0
  93. package/jsutils/promiseReduce.d.ts +2 -0
  94. package/jsutils/promiseReduce.js +2 -0
  95. package/jsutils/promiseReduce.mjs +2 -0
  96. package/jsutils/suggestionList.d.ts +2 -0
  97. package/jsutils/suggestionList.js +4 -0
  98. package/jsutils/suggestionList.mjs +4 -0
  99. package/jsutils/toError.d.ts +2 -0
  100. package/jsutils/toError.js +2 -0
  101. package/jsutils/toError.mjs +2 -0
  102. package/jsutils/toObjMap.d.ts +1 -0
  103. package/jsutils/toObjMap.js +1 -0
  104. package/jsutils/toObjMap.mjs +1 -0
  105. package/language/ast.d.ts +412 -54
  106. package/language/ast.js +95 -38
  107. package/language/ast.mjs +95 -38
  108. package/language/blockString.d.ts +1 -3
  109. package/language/blockString.js +1 -3
  110. package/language/blockString.mjs +1 -3
  111. package/language/directiveLocation.d.ts +28 -8
  112. package/language/directiveLocation.js +9 -6
  113. package/language/directiveLocation.mjs +9 -6
  114. package/language/index.d.ts +6 -0
  115. package/language/index.mjs +6 -0
  116. package/language/kinds.d.ts +57 -18
  117. package/language/kinds.js +9 -6
  118. package/language/kinds.mjs +9 -6
  119. package/language/lexer.d.ts +47 -14
  120. package/language/lexer.js +71 -13
  121. package/language/lexer.mjs +70 -13
  122. package/language/location.d.ts +16 -3
  123. package/language/location.js +14 -3
  124. package/language/location.mjs +14 -3
  125. package/language/parser.d.ts +236 -13
  126. package/language/parser.js +224 -0
  127. package/language/parser.mjs +224 -3
  128. package/language/predicates.d.ts +169 -0
  129. package/language/predicates.js +170 -0
  130. package/language/predicates.mjs +180 -0
  131. package/language/printLocation.d.ts +28 -0
  132. package/language/printLocation.js +29 -0
  133. package/language/printLocation.mjs +28 -0
  134. package/language/printString.d.ts +2 -0
  135. package/language/printString.js +5 -1
  136. package/language/printString.mjs +5 -1
  137. package/language/printer.d.ts +12 -0
  138. package/language/printer.js +19 -0
  139. package/language/printer.mjs +18 -0
  140. package/language/schemaCoordinateLexer.d.ts +8 -6
  141. package/language/schemaCoordinateLexer.js +10 -6
  142. package/language/schemaCoordinateLexer.mjs +10 -6
  143. package/language/source.d.ts +28 -0
  144. package/language/source.js +32 -0
  145. package/language/source.mjs +31 -0
  146. package/language/tokenKind.d.ts +30 -3
  147. package/language/tokenKind.js +8 -3
  148. package/language/tokenKind.mjs +8 -3
  149. package/language/visitor.d.ts +200 -72
  150. package/language/visitor.js +122 -50
  151. package/language/visitor.mjs +122 -54
  152. package/package.json +1 -1
  153. package/subscription/index.d.ts +9 -3
  154. package/subscription/index.mjs +9 -3
  155. package/type/assertName.d.ts +18 -1
  156. package/type/assertName.js +19 -1
  157. package/type/assertName.mjs +18 -1
  158. package/type/definition.d.ts +2540 -79
  159. package/type/definition.js +2214 -61
  160. package/type/definition.mjs +2241 -60
  161. package/type/directives.d.ts +193 -18
  162. package/type/directives.js +196 -19
  163. package/type/directives.mjs +196 -19
  164. package/type/index.d.ts +6 -0
  165. package/type/index.mjs +6 -0
  166. package/type/introspection.d.ts +36 -0
  167. package/type/introspection.js +33 -0
  168. package/type/introspection.mjs +41 -0
  169. package/type/scalars.d.ts +29 -2
  170. package/type/scalars.js +37 -2
  171. package/type/scalars.mjs +36 -2
  172. package/type/schema.d.ts +490 -28
  173. package/type/schema.js +484 -26
  174. package/type/schema.mjs +484 -26
  175. package/type/validate.d.ts +31 -0
  176. package/type/validate.js +32 -0
  177. package/type/validate.mjs +31 -0
  178. package/utilities/TypeInfo.d.ts +441 -1
  179. package/utilities/TypeInfo.js +444 -1
  180. package/utilities/TypeInfo.mjs +443 -1
  181. package/utilities/assertValidName.d.ts +27 -2
  182. package/utilities/assertValidName.js +28 -2
  183. package/utilities/assertValidName.mjs +27 -2
  184. package/utilities/astFromValue.d.ts +33 -3
  185. package/utilities/astFromValue.js +36 -3
  186. package/utilities/astFromValue.mjs +35 -3
  187. package/utilities/buildASTSchema.d.ts +65 -6
  188. package/utilities/buildASTSchema.js +65 -6
  189. package/utilities/buildASTSchema.mjs +65 -6
  190. package/utilities/buildClientSchema.d.ts +15 -0
  191. package/utilities/buildClientSchema.js +16 -0
  192. package/utilities/buildClientSchema.mjs +15 -0
  193. package/utilities/coerceInputValue.d.ts +46 -0
  194. package/utilities/coerceInputValue.js +47 -0
  195. package/utilities/coerceInputValue.mjs +46 -0
  196. package/utilities/concatAST.d.ts +12 -0
  197. package/utilities/concatAST.js +13 -0
  198. package/utilities/concatAST.mjs +12 -0
  199. package/utilities/extendSchema.d.ts +56 -3
  200. package/utilities/extendSchema.js +63 -3
  201. package/utilities/extendSchema.mjs +62 -3
  202. package/utilities/findBreakingChanges.d.ts +95 -0
  203. package/utilities/findBreakingChanges.js +68 -0
  204. package/utilities/findBreakingChanges.mjs +70 -0
  205. package/utilities/getIntrospectionQuery.d.ts +132 -0
  206. package/utilities/getIntrospectionQuery.js +41 -0
  207. package/utilities/getIntrospectionQuery.mjs +41 -0
  208. package/utilities/getOperationAST.d.ts +15 -0
  209. package/utilities/getOperationAST.js +16 -0
  210. package/utilities/getOperationAST.mjs +15 -0
  211. package/utilities/getOperationRootType.d.ts +18 -1
  212. package/utilities/getOperationRootType.js +19 -1
  213. package/utilities/getOperationRootType.mjs +18 -1
  214. package/utilities/index.d.ts +7 -0
  215. package/utilities/index.mjs +7 -0
  216. package/utilities/introspectionFromSchema.d.ts +54 -0
  217. package/utilities/introspectionFromSchema.js +55 -0
  218. package/utilities/introspectionFromSchema.mjs +54 -0
  219. package/utilities/lexicographicSortSchema.d.ts +35 -0
  220. package/utilities/lexicographicSortSchema.js +36 -0
  221. package/utilities/lexicographicSortSchema.mjs +35 -0
  222. package/utilities/printSchema.d.ts +63 -0
  223. package/utilities/printSchema.js +66 -0
  224. package/utilities/printSchema.mjs +67 -0
  225. package/utilities/resolveSchemaCoordinate.d.ts +62 -0
  226. package/utilities/resolveSchemaCoordinate.js +64 -0
  227. package/utilities/resolveSchemaCoordinate.mjs +63 -0
  228. package/utilities/separateOperations.d.ts +30 -0
  229. package/utilities/separateOperations.js +31 -0
  230. package/utilities/separateOperations.mjs +30 -0
  231. package/utilities/stripIgnoredCharacters.d.ts +13 -6
  232. package/utilities/stripIgnoredCharacters.js +16 -6
  233. package/utilities/stripIgnoredCharacters.mjs +15 -6
  234. package/utilities/typeComparators.d.ts +84 -0
  235. package/utilities/typeComparators.js +85 -0
  236. package/utilities/typeComparators.mjs +84 -0
  237. package/utilities/typeFromAST.d.ts +86 -0
  238. package/utilities/typeFromAST.js +3 -0
  239. package/utilities/typeFromAST.mjs +3 -0
  240. package/utilities/typedQueryDocumentNode.d.ts +4 -0
  241. package/utilities/valueFromAST.d.ts +38 -0
  242. package/utilities/valueFromAST.js +39 -0
  243. package/utilities/valueFromAST.mjs +38 -0
  244. package/utilities/valueFromASTUntyped.d.ts +15 -2
  245. package/utilities/valueFromASTUntyped.js +16 -2
  246. package/utilities/valueFromASTUntyped.mjs +15 -2
  247. package/validation/ValidationContext.d.ts +399 -0
  248. package/validation/ValidationContext.js +400 -0
  249. package/validation/ValidationContext.mjs +401 -0
  250. package/validation/index.d.ts +6 -0
  251. package/validation/index.mjs +6 -0
  252. package/validation/rules/ExecutableDefinitionsRule.d.ts +28 -0
  253. package/validation/rules/ExecutableDefinitionsRule.js +29 -0
  254. package/validation/rules/ExecutableDefinitionsRule.mjs +28 -0
  255. package/validation/rules/FieldsOnCorrectTypeRule.d.ts +28 -0
  256. package/validation/rules/FieldsOnCorrectTypeRule.js +33 -0
  257. package/validation/rules/FieldsOnCorrectTypeRule.mjs +32 -0
  258. package/validation/rules/FragmentsOnCompositeTypesRule.d.ts +28 -0
  259. package/validation/rules/FragmentsOnCompositeTypesRule.js +29 -0
  260. package/validation/rules/FragmentsOnCompositeTypesRule.mjs +28 -0
  261. package/validation/rules/KnownArgumentNamesRule.d.ts +29 -3
  262. package/validation/rules/KnownArgumentNamesRule.js +30 -3
  263. package/validation/rules/KnownArgumentNamesRule.mjs +29 -3
  264. package/validation/rules/KnownDirectivesRule.d.ts +28 -0
  265. package/validation/rules/KnownDirectivesRule.js +29 -0
  266. package/validation/rules/KnownDirectivesRule.mjs +28 -0
  267. package/validation/rules/KnownFragmentNamesRule.d.ts +28 -0
  268. package/validation/rules/KnownFragmentNamesRule.js +29 -0
  269. package/validation/rules/KnownFragmentNamesRule.mjs +28 -0
  270. package/validation/rules/KnownTypeNamesRule.d.ts +28 -0
  271. package/validation/rules/KnownTypeNamesRule.js +29 -0
  272. package/validation/rules/KnownTypeNamesRule.mjs +28 -0
  273. package/validation/rules/LoneAnonymousOperationRule.d.ts +28 -0
  274. package/validation/rules/LoneAnonymousOperationRule.js +29 -0
  275. package/validation/rules/LoneAnonymousOperationRule.mjs +28 -0
  276. package/validation/rules/LoneSchemaDefinitionRule.d.ts +21 -0
  277. package/validation/rules/LoneSchemaDefinitionRule.js +22 -0
  278. package/validation/rules/LoneSchemaDefinitionRule.mjs +21 -0
  279. package/validation/rules/MaxIntrospectionDepthRule.d.ts +31 -0
  280. package/validation/rules/MaxIntrospectionDepthRule.js +33 -0
  281. package/validation/rules/MaxIntrospectionDepthRule.mjs +34 -0
  282. package/validation/rules/NoFragmentCyclesRule.d.ts +28 -0
  283. package/validation/rules/NoFragmentCyclesRule.js +29 -0
  284. package/validation/rules/NoFragmentCyclesRule.mjs +28 -0
  285. package/validation/rules/NoUndefinedVariablesRule.d.ts +28 -0
  286. package/validation/rules/NoUndefinedVariablesRule.js +29 -0
  287. package/validation/rules/NoUndefinedVariablesRule.mjs +28 -0
  288. package/validation/rules/NoUnusedFragmentsRule.d.ts +28 -0
  289. package/validation/rules/NoUnusedFragmentsRule.js +29 -0
  290. package/validation/rules/NoUnusedFragmentsRule.mjs +28 -0
  291. package/validation/rules/NoUnusedVariablesRule.d.ts +29 -0
  292. package/validation/rules/NoUnusedVariablesRule.js +30 -0
  293. package/validation/rules/NoUnusedVariablesRule.mjs +29 -0
  294. package/validation/rules/OverlappingFieldsCanBeMergedRule.d.ts +33 -0
  295. package/validation/rules/OverlappingFieldsCanBeMergedRule.js +45 -6
  296. package/validation/rules/OverlappingFieldsCanBeMergedRule.mjs +45 -6
  297. package/validation/rules/PossibleFragmentSpreadsRule.d.ts +36 -0
  298. package/validation/rules/PossibleFragmentSpreadsRule.js +37 -0
  299. package/validation/rules/PossibleFragmentSpreadsRule.mjs +36 -0
  300. package/validation/rules/PossibleTypeExtensionsRule.d.ts +21 -0
  301. package/validation/rules/PossibleTypeExtensionsRule.js +22 -0
  302. package/validation/rules/PossibleTypeExtensionsRule.mjs +21 -0
  303. package/validation/rules/ProvidedRequiredArgumentsRule.d.ts +29 -3
  304. package/validation/rules/ProvidedRequiredArgumentsRule.js +30 -3
  305. package/validation/rules/ProvidedRequiredArgumentsRule.mjs +29 -3
  306. package/validation/rules/ScalarLeafsRule.d.ts +28 -0
  307. package/validation/rules/ScalarLeafsRule.js +29 -0
  308. package/validation/rules/ScalarLeafsRule.mjs +28 -0
  309. package/validation/rules/SingleFieldSubscriptionsRule.d.ts +33 -0
  310. package/validation/rules/SingleFieldSubscriptionsRule.js +34 -0
  311. package/validation/rules/SingleFieldSubscriptionsRule.mjs +33 -0
  312. package/validation/rules/UniqueArgumentDefinitionNamesRule.d.ts +21 -0
  313. package/validation/rules/UniqueArgumentDefinitionNamesRule.js +22 -0
  314. package/validation/rules/UniqueArgumentDefinitionNamesRule.mjs +21 -0
  315. package/validation/rules/UniqueArgumentNamesRule.d.ts +28 -0
  316. package/validation/rules/UniqueArgumentNamesRule.js +29 -0
  317. package/validation/rules/UniqueArgumentNamesRule.mjs +28 -0
  318. package/validation/rules/UniqueDirectiveNamesRule.d.ts +21 -0
  319. package/validation/rules/UniqueDirectiveNamesRule.js +22 -0
  320. package/validation/rules/UniqueDirectiveNamesRule.mjs +21 -0
  321. package/validation/rules/UniqueDirectivesPerLocationRule.d.ts +28 -0
  322. package/validation/rules/UniqueDirectivesPerLocationRule.js +29 -0
  323. package/validation/rules/UniqueDirectivesPerLocationRule.mjs +28 -0
  324. package/validation/rules/UniqueEnumValueNamesRule.d.ts +21 -0
  325. package/validation/rules/UniqueEnumValueNamesRule.js +22 -0
  326. package/validation/rules/UniqueEnumValueNamesRule.mjs +21 -0
  327. package/validation/rules/UniqueFieldDefinitionNamesRule.d.ts +21 -0
  328. package/validation/rules/UniqueFieldDefinitionNamesRule.js +22 -0
  329. package/validation/rules/UniqueFieldDefinitionNamesRule.mjs +21 -0
  330. package/validation/rules/UniqueFragmentNamesRule.d.ts +28 -0
  331. package/validation/rules/UniqueFragmentNamesRule.js +29 -0
  332. package/validation/rules/UniqueFragmentNamesRule.mjs +28 -0
  333. package/validation/rules/UniqueInputFieldNamesRule.d.ts +32 -0
  334. package/validation/rules/UniqueInputFieldNamesRule.js +33 -0
  335. package/validation/rules/UniqueInputFieldNamesRule.mjs +32 -0
  336. package/validation/rules/UniqueOperationNamesRule.d.ts +28 -0
  337. package/validation/rules/UniqueOperationNamesRule.js +29 -0
  338. package/validation/rules/UniqueOperationNamesRule.mjs +28 -0
  339. package/validation/rules/UniqueOperationTypesRule.d.ts +21 -0
  340. package/validation/rules/UniqueOperationTypesRule.js +22 -0
  341. package/validation/rules/UniqueOperationTypesRule.mjs +21 -0
  342. package/validation/rules/UniqueTypeNamesRule.d.ts +21 -0
  343. package/validation/rules/UniqueTypeNamesRule.js +22 -0
  344. package/validation/rules/UniqueTypeNamesRule.mjs +21 -0
  345. package/validation/rules/UniqueVariableNamesRule.d.ts +28 -0
  346. package/validation/rules/UniqueVariableNamesRule.js +29 -0
  347. package/validation/rules/UniqueVariableNamesRule.mjs +28 -0
  348. package/validation/rules/ValuesOfCorrectTypeRule.d.ts +28 -0
  349. package/validation/rules/ValuesOfCorrectTypeRule.js +31 -0
  350. package/validation/rules/ValuesOfCorrectTypeRule.mjs +30 -0
  351. package/validation/rules/VariablesAreInputTypesRule.d.ts +32 -0
  352. package/validation/rules/VariablesAreInputTypesRule.js +33 -0
  353. package/validation/rules/VariablesAreInputTypesRule.mjs +32 -0
  354. package/validation/rules/VariablesInAllowedPositionRule.d.ts +28 -0
  355. package/validation/rules/VariablesInAllowedPositionRule.js +35 -1
  356. package/validation/rules/VariablesInAllowedPositionRule.mjs +34 -1
  357. package/validation/rules/custom/NoDeprecatedCustomRule.d.ts +41 -0
  358. package/validation/rules/custom/NoDeprecatedCustomRule.js +42 -0
  359. package/validation/rules/custom/NoDeprecatedCustomRule.mjs +41 -0
  360. package/validation/rules/custom/NoSchemaIntrospectionCustomRule.d.ts +28 -0
  361. package/validation/rules/custom/NoSchemaIntrospectionCustomRule.js +29 -0
  362. package/validation/rules/custom/NoSchemaIntrospectionCustomRule.mjs +28 -0
  363. package/validation/specifiedRules.d.ts +2 -3
  364. package/validation/specifiedRules.js +2 -3
  365. package/validation/specifiedRules.mjs +2 -3
  366. package/validation/validate.d.ts +70 -9
  367. package/validation/validate.js +63 -7
  368. package/validation/validate.mjs +63 -7
  369. package/version.d.ts +3 -6
  370. package/version.js +6 -8
  371. package/version.mjs +5 -8
@@ -26,9 +26,44 @@ var _source = require('./source.js');
26
26
 
27
27
  var _tokenKind = require('./tokenKind.js');
28
28
 
29
+ /** @category Parsing */
30
+
29
31
  /**
30
32
  * Given a GraphQL source, parses it into a Document.
31
33
  * Throws GraphQLError if a syntax error is encountered.
34
+ * @param source - A GraphQL source string or source object.
35
+ * @param options - Optional parser configuration.
36
+ * @returns The parsed GraphQL document AST.
37
+ * @example
38
+ * ```ts
39
+ * // Parse a GraphQL document with the default parser options.
40
+ * import { parse } from 'graphql/language';
41
+ *
42
+ * const document = parse('{ hero { name } }');
43
+ *
44
+ * document.kind; // => 'Document'
45
+ * ```
46
+ * @example
47
+ * ```ts
48
+ * // This variant enables parser options and provides an explicit lexer.
49
+ * import { Lexer, Source, parse } from 'graphql/language';
50
+ *
51
+ * const document = parse('fragment A($var: Boolean) on Query { field }', {
52
+ * allowLegacyFragmentVariables: true,
53
+ * maxTokens: 20,
54
+ * noLocation: true,
55
+ * });
56
+ * const directiveDocument = parse('directive @foo @bar on FIELD', {
57
+ * experimentalDirectivesOnDirectiveDefinitions: true,
58
+ * });
59
+ * const source = new Source('{ hero }');
60
+ * const lexerDocument = parse(source, { lexer: new Lexer(source) });
61
+ *
62
+ * document.definitions[0].kind; // => 'FragmentDefinition'
63
+ * document.loc; // => undefined
64
+ * directiveDocument.definitions[0].kind; // => 'DirectiveDefinition'
65
+ * lexerDocument.definitions[0].kind; // => 'OperationDefinition'
66
+ * ```
32
67
  */
33
68
  function parse(source, options) {
34
69
  const parser = new Parser(source, options);
@@ -48,6 +83,17 @@ function parse(source, options) {
48
83
  * in isolation of complete GraphQL documents.
49
84
  *
50
85
  * Consider providing the results to the utility function: valueFromAST().
86
+ * @param source - A GraphQL source string or source object containing a value.
87
+ * @param options - Optional parser configuration.
88
+ * @returns The parsed GraphQL value AST.
89
+ * @example
90
+ * ```ts
91
+ * import { parseValue } from 'graphql/language';
92
+ *
93
+ * const value = parseValue('[42]');
94
+ *
95
+ * value.kind; // => 'ListValue'
96
+ * ```
51
97
  */
52
98
 
53
99
  function parseValue(source, options) {
@@ -60,6 +106,18 @@ function parseValue(source, options) {
60
106
  /**
61
107
  * Similar to parseValue(), but raises a parse error if it encounters a
62
108
  * variable. The return type will be a constant value.
109
+ * @param source - A GraphQL source string or source object containing a constant value.
110
+ * @param options - Optional parser configuration.
111
+ * @returns The parsed GraphQL constant value AST.
112
+ * @example
113
+ * ```ts
114
+ * import { parseConstValue } from 'graphql/language';
115
+ *
116
+ * const value = parseConstValue('{ enabled: true }');
117
+ *
118
+ * value.kind; // => 'ObjectValue'
119
+ * parseConstValue('$variable'); // throws an error
120
+ * ```
63
121
  */
64
122
 
65
123
  function parseConstValue(source, options) {
@@ -78,6 +136,17 @@ function parseConstValue(source, options) {
78
136
  * in isolation of complete GraphQL documents.
79
137
  *
80
138
  * Consider providing the results to the utility function: typeFromAST().
139
+ * @param source - A GraphQL source string or source object containing a type reference.
140
+ * @param options - Optional parser configuration.
141
+ * @returns The parsed GraphQL type AST.
142
+ * @example
143
+ * ```ts
144
+ * import { parseType } from 'graphql/language';
145
+ *
146
+ * const type = parseType('[String!]');
147
+ *
148
+ * type.kind; // => 'ListType'
149
+ * ```
81
150
  */
82
151
 
83
152
  function parseType(source, options) {
@@ -95,6 +164,16 @@ function parseType(source, options) {
95
164
  * Consider providing the results to the utility function:
96
165
  * resolveASTSchemaCoordinate(). Or calling resolveSchemaCoordinate() directly
97
166
  * with an unparsed source.
167
+ * @param source - A GraphQL source string or source object containing a schema coordinate.
168
+ * @returns The parsed GraphQL schema coordinate AST.
169
+ * @example
170
+ * ```ts
171
+ * import { parseSchemaCoordinate } from 'graphql/language';
172
+ *
173
+ * const coordinate = parseSchemaCoordinate('Query.hero');
174
+ *
175
+ * coordinate.kind; // => 'MemberCoordinate'
176
+ * ```
98
177
  */
99
178
 
100
179
  function parseSchemaCoordinate(source) {
@@ -144,6 +223,8 @@ class Parser {
144
223
  }
145
224
  /**
146
225
  * Converts a name lex token into a name parse node.
226
+ *
227
+ * @internal
147
228
  */
148
229
 
149
230
  parseName() {
@@ -156,6 +237,8 @@ class Parser {
156
237
 
157
238
  /**
158
239
  * Document : Definition+
240
+ *
241
+ * @internal
159
242
  */
160
243
 
161
244
  parseDocument() {
@@ -190,6 +273,8 @@ class Parser {
190
273
  * - UnionTypeDefinition
191
274
  * - EnumTypeDefinition
192
275
  * - InputObjectTypeDefinition
276
+ *
277
+ * @internal
193
278
  */
194
279
 
195
280
  parseDefinition() {
@@ -268,6 +353,8 @@ class Parser {
268
353
  * OperationDefinition :
269
354
  * - SelectionSet
270
355
  * - OperationType Name? VariableDefinitions? Directives? SelectionSet
356
+ *
357
+ * @internal
271
358
  */
272
359
 
273
360
  parseOperationDefinition() {
@@ -305,6 +392,8 @@ class Parser {
305
392
  }
306
393
  /**
307
394
  * OperationType : one of query mutation subscription
395
+ *
396
+ * @internal
308
397
  */
309
398
 
310
399
  parseOperationType() {
@@ -325,6 +414,8 @@ class Parser {
325
414
  }
326
415
  /**
327
416
  * VariableDefinitions : ( VariableDefinition+ )
417
+ *
418
+ * @internal
328
419
  */
329
420
 
330
421
  parseVariableDefinitions() {
@@ -336,6 +427,8 @@ class Parser {
336
427
  }
337
428
  /**
338
429
  * VariableDefinition : Variable : Type DefaultValue? Directives[Const]?
430
+ *
431
+ * @internal
339
432
  */
340
433
 
341
434
  parseVariableDefinition() {
@@ -354,6 +447,8 @@ class Parser {
354
447
  }
355
448
  /**
356
449
  * Variable : $ Name
450
+ *
451
+ * @internal
357
452
  */
358
453
 
359
454
  parseVariable() {
@@ -368,6 +463,8 @@ class Parser {
368
463
  * ```
369
464
  * SelectionSet : { Selection+ }
370
465
  * ```
466
+ *
467
+ * @internal
371
468
  */
372
469
 
373
470
  parseSelectionSet() {
@@ -385,6 +482,8 @@ class Parser {
385
482
  * - Field
386
483
  * - FragmentSpread
387
484
  * - InlineFragment
485
+ *
486
+ * @internal
388
487
  */
389
488
 
390
489
  parseSelection() {
@@ -396,6 +495,8 @@ class Parser {
396
495
  * Field : Alias? Name Arguments? Directives? SelectionSet?
397
496
  *
398
497
  * Alias : Name :
498
+ *
499
+ * @internal
399
500
  */
400
501
 
401
502
  parseField() {
@@ -424,6 +525,8 @@ class Parser {
424
525
  }
425
526
  /**
426
527
  * Arguments[Const] : ( Argument[?Const]+ )
528
+ *
529
+ * @internal
427
530
  */
428
531
 
429
532
  parseArguments(isConst) {
@@ -436,6 +539,8 @@ class Parser {
436
539
  }
437
540
  /**
438
541
  * Argument[Const] : Name : Value[?Const]
542
+ *
543
+ * @internal
439
544
  */
440
545
 
441
546
  parseArgument(isConst = false) {
@@ -459,6 +564,8 @@ class Parser {
459
564
  * FragmentSpread : ... FragmentName Directives?
460
565
  *
461
566
  * InlineFragment : ... TypeCondition? Directives? SelectionSet
567
+ *
568
+ * @internal
462
569
  */
463
570
 
464
571
  parseFragment() {
@@ -486,6 +593,8 @@ class Parser {
486
593
  * - fragment FragmentName on TypeCondition Directives? SelectionSet
487
594
  *
488
595
  * TypeCondition : NamedType
596
+ *
597
+ * @internal
489
598
  */
490
599
 
491
600
  parseFragmentDefinition() {
@@ -518,6 +627,8 @@ class Parser {
518
627
  }
519
628
  /**
520
629
  * FragmentName : Name but not `on`
630
+ *
631
+ * @internal
521
632
  */
522
633
 
523
634
  parseFragmentName() {
@@ -545,6 +656,8 @@ class Parser {
545
656
  * NullValue : `null`
546
657
  *
547
658
  * EnumValue : Name but not `true`, `false` or `null`
659
+ *
660
+ * @internal
548
661
  */
549
662
 
550
663
  parseValueLiteral(isConst) {
@@ -643,6 +756,8 @@ class Parser {
643
756
  * ListValue[Const] :
644
757
  * - [ ]
645
758
  * - [ Value[?Const]+ ]
759
+ *
760
+ * @internal
646
761
  */
647
762
 
648
763
  parseList(isConst) {
@@ -663,6 +778,8 @@ class Parser {
663
778
  * - { }
664
779
  * - { ObjectField[?Const]+ }
665
780
  * ```
781
+ *
782
+ * @internal
666
783
  */
667
784
 
668
785
  parseObject(isConst) {
@@ -679,6 +796,8 @@ class Parser {
679
796
  }
680
797
  /**
681
798
  * ObjectField[Const] : Name : Value[?Const]
799
+ *
800
+ * @internal
682
801
  */
683
802
 
684
803
  parseObjectField(isConst) {
@@ -694,6 +813,8 @@ class Parser {
694
813
 
695
814
  /**
696
815
  * Directives[Const] : Directive[?Const]+
816
+ *
817
+ * @internal
697
818
  */
698
819
 
699
820
  parseDirectives(isConst) {
@@ -713,6 +834,8 @@ class Parser {
713
834
  * ```
714
835
  * Directive[Const] : @ Name Arguments[?Const]?
715
836
  * ```
837
+ *
838
+ * @internal
716
839
  */
717
840
 
718
841
  parseDirective(isConst) {
@@ -730,6 +853,8 @@ class Parser {
730
853
  * - NamedType
731
854
  * - ListType
732
855
  * - NonNullType
856
+ *
857
+ * @internal
733
858
  */
734
859
 
735
860
  parseTypeReference() {
@@ -758,6 +883,8 @@ class Parser {
758
883
  }
759
884
  /**
760
885
  * NamedType : Name
886
+ *
887
+ * @internal
761
888
  */
762
889
 
763
890
  parseNamedType() {
@@ -775,6 +902,8 @@ class Parser {
775
902
  }
776
903
  /**
777
904
  * Description : StringValue
905
+ *
906
+ * @internal
778
907
  */
779
908
 
780
909
  parseDescription() {
@@ -786,6 +915,8 @@ class Parser {
786
915
  * ```
787
916
  * SchemaDefinition : Description? schema Directives[Const]? { OperationTypeDefinition+ }
788
917
  * ```
918
+ *
919
+ * @internal
789
920
  */
790
921
 
791
922
  parseSchemaDefinition() {
@@ -807,6 +938,8 @@ class Parser {
807
938
  }
808
939
  /**
809
940
  * OperationTypeDefinition : OperationType : NamedType
941
+ *
942
+ * @internal
810
943
  */
811
944
 
812
945
  parseOperationTypeDefinition() {
@@ -822,6 +955,8 @@ class Parser {
822
955
  }
823
956
  /**
824
957
  * ScalarTypeDefinition : Description? scalar Name Directives[Const]?
958
+ *
959
+ * @internal
825
960
  */
826
961
 
827
962
  parseScalarTypeDefinition() {
@@ -841,6 +976,8 @@ class Parser {
841
976
  * ObjectTypeDefinition :
842
977
  * Description?
843
978
  * type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition?
979
+ *
980
+ * @internal
844
981
  */
845
982
 
846
983
  parseObjectTypeDefinition() {
@@ -864,6 +1001,8 @@ class Parser {
864
1001
  * ImplementsInterfaces :
865
1002
  * - implements `&`? NamedType
866
1003
  * - ImplementsInterfaces & NamedType
1004
+ *
1005
+ * @internal
867
1006
  */
868
1007
 
869
1008
  parseImplementsInterfaces() {
@@ -875,6 +1014,8 @@ class Parser {
875
1014
  * ```
876
1015
  * FieldsDefinition : { FieldDefinition+ }
877
1016
  * ```
1017
+ *
1018
+ * @internal
878
1019
  */
879
1020
 
880
1021
  parseFieldsDefinition() {
@@ -887,6 +1028,8 @@ class Parser {
887
1028
  /**
888
1029
  * FieldDefinition :
889
1030
  * - Description? Name ArgumentsDefinition? : Type Directives[Const]?
1031
+ *
1032
+ * @internal
890
1033
  */
891
1034
 
892
1035
  parseFieldDefinition() {
@@ -908,6 +1051,8 @@ class Parser {
908
1051
  }
909
1052
  /**
910
1053
  * ArgumentsDefinition : ( InputValueDefinition+ )
1054
+ *
1055
+ * @internal
911
1056
  */
912
1057
 
913
1058
  parseArgumentDefs() {
@@ -920,6 +1065,8 @@ class Parser {
920
1065
  /**
921
1066
  * InputValueDefinition :
922
1067
  * - Description? Name : Type DefaultValue? Directives[Const]?
1068
+ *
1069
+ * @internal
923
1070
  */
924
1071
 
925
1072
  parseInputValueDef() {
@@ -947,6 +1094,8 @@ class Parser {
947
1094
  /**
948
1095
  * InterfaceTypeDefinition :
949
1096
  * - Description? interface Name Directives[Const]? FieldsDefinition?
1097
+ *
1098
+ * @internal
950
1099
  */
951
1100
 
952
1101
  parseInterfaceTypeDefinition() {
@@ -969,6 +1118,8 @@ class Parser {
969
1118
  /**
970
1119
  * UnionTypeDefinition :
971
1120
  * - Description? union Name Directives[Const]? UnionMemberTypes?
1121
+ *
1122
+ * @internal
972
1123
  */
973
1124
 
974
1125
  parseUnionTypeDefinition() {
@@ -990,6 +1141,8 @@ class Parser {
990
1141
  * UnionMemberTypes :
991
1142
  * - = `|`? NamedType
992
1143
  * - UnionMemberTypes | NamedType
1144
+ *
1145
+ * @internal
993
1146
  */
994
1147
 
995
1148
  parseUnionMemberTypes() {
@@ -1000,6 +1153,8 @@ class Parser {
1000
1153
  /**
1001
1154
  * EnumTypeDefinition :
1002
1155
  * - Description? enum Name Directives[Const]? EnumValuesDefinition?
1156
+ *
1157
+ * @internal
1003
1158
  */
1004
1159
 
1005
1160
  parseEnumTypeDefinition() {
@@ -1021,6 +1176,8 @@ class Parser {
1021
1176
  * ```
1022
1177
  * EnumValuesDefinition : { EnumValueDefinition+ }
1023
1178
  * ```
1179
+ *
1180
+ * @internal
1024
1181
  */
1025
1182
 
1026
1183
  parseEnumValuesDefinition() {
@@ -1032,6 +1189,8 @@ class Parser {
1032
1189
  }
1033
1190
  /**
1034
1191
  * EnumValueDefinition : Description? EnumValue Directives[Const]?
1192
+ *
1193
+ * @internal
1035
1194
  */
1036
1195
 
1037
1196
  parseEnumValueDefinition() {
@@ -1048,6 +1207,8 @@ class Parser {
1048
1207
  }
1049
1208
  /**
1050
1209
  * EnumValue : Name but not `true`, `false` or `null`
1210
+ *
1211
+ * @internal
1051
1212
  */
1052
1213
 
1053
1214
  parseEnumValueName() {
@@ -1070,6 +1231,8 @@ class Parser {
1070
1231
  /**
1071
1232
  * InputObjectTypeDefinition :
1072
1233
  * - Description? input Name Directives[Const]? InputFieldsDefinition?
1234
+ *
1235
+ * @internal
1073
1236
  */
1074
1237
 
1075
1238
  parseInputObjectTypeDefinition() {
@@ -1091,6 +1254,8 @@ class Parser {
1091
1254
  * ```
1092
1255
  * InputFieldsDefinition : { InputValueDefinition+ }
1093
1256
  * ```
1257
+ *
1258
+ * @internal
1094
1259
  */
1095
1260
 
1096
1261
  parseInputFieldsDefinition() {
@@ -1113,6 +1278,8 @@ class Parser {
1113
1278
  * - EnumTypeExtension
1114
1279
  * - InputObjectTypeDefinition
1115
1280
  * - DirectiveDefinitionExtension
1281
+ *
1282
+ * @internal
1116
1283
  */
1117
1284
 
1118
1285
  parseTypeSystemExtension() {
@@ -1158,6 +1325,8 @@ class Parser {
1158
1325
  * - extend schema Directives[Const]? { OperationTypeDefinition+ }
1159
1326
  * - extend schema Directives[Const]
1160
1327
  * ```
1328
+ *
1329
+ * @internal
1161
1330
  */
1162
1331
 
1163
1332
  parseSchemaExtension() {
@@ -1184,6 +1353,8 @@ class Parser {
1184
1353
  /**
1185
1354
  * ScalarTypeExtension :
1186
1355
  * - extend scalar Name Directives[Const]
1356
+ *
1357
+ * @internal
1187
1358
  */
1188
1359
 
1189
1360
  parseScalarTypeExtension() {
@@ -1208,6 +1379,8 @@ class Parser {
1208
1379
  * - extend type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition
1209
1380
  * - extend type Name ImplementsInterfaces? Directives[Const]
1210
1381
  * - extend type Name ImplementsInterfaces
1382
+ *
1383
+ * @internal
1211
1384
  */
1212
1385
 
1213
1386
  parseObjectTypeExtension() {
@@ -1240,6 +1413,8 @@ class Parser {
1240
1413
  * - extend interface Name ImplementsInterfaces? Directives[Const]? FieldsDefinition
1241
1414
  * - extend interface Name ImplementsInterfaces? Directives[Const]
1242
1415
  * - extend interface Name ImplementsInterfaces
1416
+ *
1417
+ * @internal
1243
1418
  */
1244
1419
 
1245
1420
  parseInterfaceTypeExtension() {
@@ -1271,6 +1446,8 @@ class Parser {
1271
1446
  * UnionTypeExtension :
1272
1447
  * - extend union Name Directives[Const]? UnionMemberTypes
1273
1448
  * - extend union Name Directives[Const]
1449
+ *
1450
+ * @internal
1274
1451
  */
1275
1452
 
1276
1453
  parseUnionTypeExtension() {
@@ -1296,6 +1473,8 @@ class Parser {
1296
1473
  * EnumTypeExtension :
1297
1474
  * - extend enum Name Directives[Const]? EnumValuesDefinition
1298
1475
  * - extend enum Name Directives[Const]
1476
+ *
1477
+ * @internal
1299
1478
  */
1300
1479
 
1301
1480
  parseEnumTypeExtension() {
@@ -1321,6 +1500,8 @@ class Parser {
1321
1500
  * InputObjectTypeExtension :
1322
1501
  * - extend input Name Directives[Const]? InputFieldsDefinition
1323
1502
  * - extend input Name Directives[Const]
1503
+ *
1504
+ * @internal
1324
1505
  */
1325
1506
 
1326
1507
  parseInputObjectTypeExtension() {
@@ -1366,6 +1547,8 @@ class Parser {
1366
1547
  * DirectiveDefinition :
1367
1548
  * - Description? directive @ Name ArgumentsDefinition? `repeatable`? on DirectiveLocations
1368
1549
  * ```
1550
+ *
1551
+ * @internal
1369
1552
  */
1370
1553
 
1371
1554
  parseDirectiveDefinition() {
@@ -1396,6 +1579,8 @@ class Parser {
1396
1579
  * DirectiveLocations :
1397
1580
  * - `|`? DirectiveLocation
1398
1581
  * - DirectiveLocations | DirectiveLocation
1582
+ *
1583
+ * @internal
1399
1584
  */
1400
1585
 
1401
1586
  parseDirectiveLocations() {
@@ -1456,6 +1641,19 @@ class Parser {
1456
1641
  * - Name . Name ( Name : )
1457
1642
  * - \@ Name
1458
1643
  * - \@ Name ( Name : )
1644
+ * @returns Parsed schema coordinate AST.
1645
+ * @example
1646
+ * ```ts
1647
+ * import { Parser, Source } from 'graphql/language';
1648
+ *
1649
+ * const typeCoordinate = new Parser(new Source('User.name')).parseSchemaCoordinate();
1650
+ * const directiveCoordinate = new Parser(new Source('@include(if:)')).parseSchemaCoordinate();
1651
+ *
1652
+ * typeCoordinate.name.value; // => 'User'
1653
+ * typeCoordinate.memberName?.value; // => 'name'
1654
+ * directiveCoordinate.name.value; // => 'deprecated'
1655
+ * directiveCoordinate.argumentName?.value; // => 'reason'
1656
+ * ```
1459
1657
  */
1460
1658
 
1461
1659
  parseSchemaCoordinate() {
@@ -1519,6 +1717,8 @@ class Parser {
1519
1717
  * Returns a node that, if configured to do so, sets a "loc" field as a
1520
1718
  * location object, used to identify the place in the source that created a
1521
1719
  * given parsed object.
1720
+ *
1721
+ * @internal
1522
1722
  */
1523
1723
 
1524
1724
  node(startToken, node) {
@@ -1534,6 +1734,8 @@ class Parser {
1534
1734
  }
1535
1735
  /**
1536
1736
  * Determines if the next token is of a given kind
1737
+ *
1738
+ * @internal
1537
1739
  */
1538
1740
 
1539
1741
  peek(kind) {
@@ -1542,6 +1744,8 @@ class Parser {
1542
1744
  /**
1543
1745
  * If the next token is of the given kind, return that token after advancing the lexer.
1544
1746
  * Otherwise, do not change the parser state and throw an error.
1747
+ *
1748
+ * @internal
1545
1749
  */
1546
1750
 
1547
1751
  expectToken(kind) {
@@ -1561,6 +1765,8 @@ class Parser {
1561
1765
  /**
1562
1766
  * If the next token is of the given kind, return "true" after advancing the lexer.
1563
1767
  * Otherwise, do not change the parser state and return "false".
1768
+ *
1769
+ * @internal
1564
1770
  */
1565
1771
 
1566
1772
  expectOptionalToken(kind) {
@@ -1576,6 +1782,8 @@ class Parser {
1576
1782
  /**
1577
1783
  * If the next token is a given keyword, advance the lexer.
1578
1784
  * Otherwise, do not change the parser state and throw an error.
1785
+ *
1786
+ * @internal
1579
1787
  */
1580
1788
 
1581
1789
  expectKeyword(value) {
@@ -1594,6 +1802,8 @@ class Parser {
1594
1802
  /**
1595
1803
  * If the next token is a given keyword, return "true" after advancing the lexer.
1596
1804
  * Otherwise, do not change the parser state and return "false".
1805
+ *
1806
+ * @internal
1597
1807
  */
1598
1808
 
1599
1809
  expectOptionalKeyword(value) {
@@ -1608,6 +1818,8 @@ class Parser {
1608
1818
  }
1609
1819
  /**
1610
1820
  * Helper function for creating an error when an unexpected lexed token is encountered.
1821
+ *
1822
+ * @internal
1611
1823
  */
1612
1824
 
1613
1825
  unexpected(atToken) {
@@ -1623,6 +1835,8 @@ class Parser {
1623
1835
  * Returns a possibly empty list of parse nodes, determined by the parseFn.
1624
1836
  * This list begins with a lex token of openKind and ends with a lex token of closeKind.
1625
1837
  * Advances the parser to the next lex token after the closing token.
1838
+ *
1839
+ * @internal
1626
1840
  */
1627
1841
 
1628
1842
  any(openKind, parseFn, closeKind) {
@@ -1640,6 +1854,8 @@ class Parser {
1640
1854
  * It can be empty only if open token is missing otherwise it will always return non-empty list
1641
1855
  * that begins with a lex token of openKind and ends with a lex token of closeKind.
1642
1856
  * Advances the parser to the next lex token after the closing token.
1857
+ *
1858
+ * @internal
1643
1859
  */
1644
1860
 
1645
1861
  optionalMany(openKind, parseFn, closeKind) {
@@ -1659,6 +1875,8 @@ class Parser {
1659
1875
  * Returns a non-empty list of parse nodes, determined by the parseFn.
1660
1876
  * This list begins with a lex token of openKind and ends with a lex token of closeKind.
1661
1877
  * Advances the parser to the next lex token after the closing token.
1878
+ *
1879
+ * @internal
1662
1880
  */
1663
1881
 
1664
1882
  many(openKind, parseFn, closeKind) {
@@ -1675,6 +1893,8 @@ class Parser {
1675
1893
  * Returns a non-empty list of parse nodes, determined by the parseFn.
1676
1894
  * This list may begin with a lex token of delimiterKind followed by items separated by lex tokens of tokenKind.
1677
1895
  * Advances the parser to the next lex token after last item in the list.
1896
+ *
1897
+ * @internal
1678
1898
  */
1679
1899
 
1680
1900
  delimitedMany(delimiterKind, parseFn) {
@@ -1708,6 +1928,8 @@ class Parser {
1708
1928
  }
1709
1929
  /**
1710
1930
  * A helper function to describe a token as a string for debugging.
1931
+ *
1932
+ * @internal
1711
1933
  */
1712
1934
 
1713
1935
  exports.Parser = Parser;
@@ -1718,6 +1940,8 @@ function getTokenDesc(token) {
1718
1940
  }
1719
1941
  /**
1720
1942
  * A helper function to describe a token kind as a string for debugging.
1943
+ *
1944
+ * @internal
1721
1945
  */
1722
1946
 
1723
1947
  function getTokenKindDesc(kind) {