Skip to content

Commit a430662

Browse files
committed
*.d.ts: Swith comments to comment to TSDoc
Typescript strips all non-TSDoc documents in generated definitions
1 parent 1bd65a3 commit a430662

25 files changed

+378
-357
lines changed

src/index.d.ts

Lines changed: 60 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
* import { parse } from 'graphql';
2323
* import { parse } from 'graphql/language';
2424
*/
25-
// The GraphQL.js version info.
25+
/** The GraphQL.js version info. */
2626
export { version, versionInfo } from './version';
27-
// The primary entry point into fulfilling a GraphQL request.
27+
/** The primary entry point into fulfilling a GraphQL request. */
2828
export { GraphQLArgs, graphql, graphqlSync } from './graphql';
29-
// Create and operate on GraphQL type definitions and schema.
29+
/** Create and operate on GraphQL type definitions and schema. */
3030
export {
31-
// Definitions
31+
/** Definitions */
3232
GraphQLSchema,
3333
GraphQLDirective,
3434
GraphQLScalarType,
@@ -39,24 +39,24 @@ export {
3939
GraphQLInputObjectType,
4040
GraphQLList,
4141
GraphQLNonNull,
42-
// Standard GraphQL Scalars
42+
/** Standard GraphQL Scalars */
4343
specifiedScalarTypes,
4444
GraphQLInt,
4545
GraphQLFloat,
4646
GraphQLString,
4747
GraphQLBoolean,
4848
GraphQLID,
49-
// Built-in Directives defined by the Spec
49+
/** Built-in Directives defined by the Spec */
5050
specifiedDirectives,
5151
GraphQLIncludeDirective,
5252
GraphQLSkipDirective,
5353
GraphQLDeprecatedDirective,
5454
GraphQLSpecifiedByDirective,
55-
// "Enum" of Type Kinds
55+
/** "Enum" of Type Kinds */
5656
TypeKind,
57-
// Constant Deprecation Reason
57+
/** Constant Deprecation Reason */
5858
DEFAULT_DEPRECATION_REASON,
59-
// GraphQL Types for introspection.
59+
/** GraphQL Types for introspection. */
6060
introspectionTypes,
6161
__Schema,
6262
__Directive,
@@ -66,11 +66,11 @@ export {
6666
__InputValue,
6767
__EnumValue,
6868
__TypeKind,
69-
// Meta-field definitions.
69+
/** Meta-field definitions. */
7070
SchemaMetaFieldDef,
7171
TypeMetaFieldDef,
7272
TypeNameMetaFieldDef,
73-
// Predicates
73+
/** Predicates */
7474
isSchema,
7575
isDirective,
7676
isType,
@@ -95,7 +95,7 @@ export {
9595
isSpecifiedScalarType,
9696
isIntrospectionType,
9797
isSpecifiedDirective,
98-
// Assertions
98+
/** Assertions */
9999
assertSchema,
100100
assertDirective,
101101
assertType,
@@ -115,10 +115,10 @@ export {
115115
assertWrappingType,
116116
assertNullableType,
117117
assertNamedType,
118-
// Un-modifiers
118+
/** Un-modifiers */
119119
getNullableType,
120120
getNamedType,
121-
// Validate GraphQL schema.
121+
/** Validate GraphQL schema. */
122122
validateSchema,
123123
assertValidSchema,
124124
} from './type/index';
@@ -179,33 +179,33 @@ export {
179179
GraphQLScalarValueParser,
180180
GraphQLScalarLiteralParser,
181181
} from './type/index';
182-
// Parse and operate on GraphQL language source files.
182+
/** Parse and operate on GraphQL language source files. */
183183
export {
184184
Token,
185185
Source,
186186
Location,
187187
getLocation,
188-
// Print source location
188+
/** Print source location */
189189
printLocation,
190190
printSourceLocation,
191-
// Lex
191+
/** Lex */
192192
Lexer,
193193
TokenKind,
194-
// Parse
194+
/** Parse */
195195
parse,
196196
parseValue,
197197
parseConstValue,
198198
parseType,
199-
// Print
199+
/** Print */
200200
print,
201-
// Visit
201+
/** Visit */
202202
visit,
203203
visitInParallel,
204204
getVisitFn,
205205
BREAK,
206206
Kind,
207207
DirectiveLocation,
208-
// Predicates
208+
/** Predicates */
209209
isDefinitionNode,
210210
isExecutableDefinitionNode,
211211
isSelectionNode,
@@ -223,13 +223,13 @@ export {
223223
TokenKindEnum,
224224
KindEnum,
225225
DirectiveLocationEnum,
226-
// Visitor utilities
226+
/** Visitor utilities */
227227
ASTVisitor,
228228
ASTVisitFn,
229-
// AST nodes
229+
/** AST nodes */
230230
ASTNode,
231231
ASTKindToNode,
232-
// Each kind of AST node
232+
/** Each kind of AST node */
233233
NameNode,
234234
DocumentNode,
235235
DefinitionNode,
@@ -290,7 +290,7 @@ export {
290290
EnumTypeExtensionNode,
291291
InputObjectTypeExtensionNode,
292292
} from './language/index';
293-
// Execute GraphQL queries.
293+
/** Execute GraphQL queries. */
294294
export {
295295
execute,
296296
executeSync,
@@ -307,13 +307,13 @@ export {
307307
createSourceEventStream,
308308
SubscriptionArgs,
309309
} from './subscription/index';
310-
// Validate GraphQL documents.
310+
/** Validate GraphQL documents. */
311311
export {
312312
validate,
313313
ValidationContext,
314-
// All validation rules in the GraphQL Specification.
314+
/** All validation rules in the GraphQL Specification. */
315315
specifiedRules,
316-
// Individual validation rules.
316+
/** Individual validation rules. */
317317
ExecutableDefinitionsRule,
318318
FieldsOnCorrectTypeRule,
319319
FragmentsOnCompositeTypesRule,
@@ -340,20 +340,20 @@ export {
340340
ValuesOfCorrectTypeRule,
341341
VariablesAreInputTypesRule,
342342
VariablesInAllowedPositionRule,
343-
// SDL-specific validation rules
343+
/** SDL-specific validation rules */
344344
LoneSchemaDefinitionRule,
345345
UniqueOperationTypesRule,
346346
UniqueTypeNamesRule,
347347
UniqueEnumValueNamesRule,
348348
UniqueFieldDefinitionNamesRule,
349349
UniqueDirectiveNamesRule,
350350
PossibleTypeExtensionsRule,
351-
// Custom validation rules
351+
/** Custom validation rules */
352352
NoDeprecatedCustomRule,
353353
NoSchemaIntrospectionCustomRule,
354354
ValidationRule,
355355
} from './validation/index';
356-
// Create, format, and print GraphQL errors.
356+
/** Create, format, and print GraphQL errors. */
357357
export {
358358
GraphQLError,
359359
syntaxError,
@@ -362,65 +362,63 @@ export {
362362
formatError,
363363
GraphQLFormattedError,
364364
} from './error/index';
365-
// Utilities for operating on GraphQL type schema and parsed sources.
365+
/** Utilities for operating on GraphQL type schema and parsed sources. */
366366
export {
367-
// Produce the GraphQL query recommended for a full schema introspection.
368-
// Accepts optional IntrospectionOptions.
367+
/**
368+
* Produce the GraphQL query recommended for a full schema introspection.
369+
* Accepts optional IntrospectionOptions.
370+
*/
369371
getIntrospectionQuery,
370-
// Gets the target Operation from a Document.
372+
/** Gets the target Operation from a Document. */
371373
getOperationAST,
372-
// Gets the Type for the target Operation AST.
374+
/** Gets the Type for the target Operation AST. */
373375
getOperationRootType,
374-
// Convert a GraphQLSchema to an IntrospectionQuery.
376+
/** Convert a GraphQLSchema to an IntrospectionQuery. */
375377
introspectionFromSchema,
376-
// Build a GraphQLSchema from an introspection result.
378+
/** Build a GraphQLSchema from an introspection result. */
377379
buildClientSchema,
378-
// Build a GraphQLSchema from a parsed GraphQL Schema language AST.
380+
/** Build a GraphQLSchema from a parsed GraphQL Schema language AST. */
379381
buildASTSchema,
380-
// Build a GraphQLSchema from a GraphQL schema language document.
382+
/** Build a GraphQLSchema from a GraphQL schema language document. */
381383
buildSchema,
382-
// Extends an existing GraphQLSchema from a parsed GraphQL Schema
383-
// language AST.
384+
/** Extends an existing GraphQLSchema from a parsed GraphQL Schema language AST. */
384385
extendSchema,
385-
// Sort a GraphQLSchema.
386+
/** Sort a GraphQLSchema. */
386387
lexicographicSortSchema,
387-
// Print a GraphQLSchema to GraphQL Schema language.
388+
/** Print a GraphQLSchema to GraphQL Schema language. */
388389
printSchema,
389-
// Print a GraphQLType to GraphQL Schema language.
390+
/** Print a GraphQLType to GraphQL Schema language. */
390391
printType,
391-
// Prints the built-in introspection schema in the Schema Language
392-
// format.
392+
/** Prints the built-in introspection schema in the Schema Language format. */
393393
printIntrospectionSchema,
394-
// Create a GraphQLType from a GraphQL language AST.
394+
/** Create a GraphQLType from a GraphQL language AST. */
395395
typeFromAST,
396-
// Create a JavaScript value from a GraphQL language AST with a Type.
396+
/** Create a JavaScript value from a GraphQL language AST with a Type. */
397397
valueFromAST,
398-
// Create a JavaScript value from a GraphQL language AST without a Type.
398+
/** Create a JavaScript value from a GraphQL language AST without a Type. */
399399
valueFromASTUntyped,
400-
// Create a GraphQL language AST from a JavaScript value.
400+
/** Create a GraphQL language AST from a JavaScript value. */
401401
astFromValue,
402-
// A helper to use within recursive-descent visitors which need to be aware of
403-
// the GraphQL type system.
402+
/** A helper to use within recursive-descent visitors which need to be aware of the GraphQL type system. */
404403
TypeInfo,
405404
visitWithTypeInfo,
406-
// Coerces a JavaScript value to a GraphQL type, or produces errors.
405+
/** Coerces a JavaScript value to a GraphQL type, or produces errors. */
407406
coerceInputValue,
408-
// Concatenates multiple AST together.
407+
/** Concatenates multiple AST together. */
409408
concatAST,
410-
// Separates an AST into an AST per Operation.
409+
/** Separates an AST into an AST per Operation. */
411410
separateOperations,
412-
// Strips characters that are not significant to the validity or execution
413-
// of a GraphQL document.
411+
/** Strips characters that are not significant to the validity or execution of a GraphQL document. */
414412
stripIgnoredCharacters,
415-
// Comparators for types
413+
/** Comparators for types */
416414
isEqualType,
417415
isTypeSubTypeOf,
418416
doTypesOverlap,
419-
// Asserts a string is a valid GraphQL name.
417+
/** Asserts a string is a valid GraphQL name. */
420418
assertValidName,
421-
// Determine if a string is a valid GraphQL name.
419+
/** Determine if a string is a valid GraphQL name. */
422420
isValidNameError,
423-
// Compares two GraphQLSchemas and detects breaking changes.
421+
/** Compares two GraphQLSchemas and detects breaking changes. */
424422
BreakingChangeType,
425423
DangerousChangeType,
426424
findBreakingChanges,

0 commit comments

Comments
 (0)