UNPKG

842 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.normalizeDeclarationKind = exports.DEFAULT_DECLARATION_KINDS = void 0;
4exports.DEFAULT_DECLARATION_KINDS = {
5 directive: 'type',
6 scalar: 'type',
7 input: 'type',
8 type: 'type',
9 interface: 'type',
10 arguments: 'type',
11};
12function normalizeDeclarationKind(declarationKind) {
13 if (typeof declarationKind === 'string') {
14 return {
15 directive: declarationKind,
16 scalar: declarationKind,
17 input: declarationKind,
18 type: declarationKind,
19 interface: declarationKind,
20 arguments: declarationKind,
21 };
22 }
23 return {
24 ...exports.DEFAULT_DECLARATION_KINDS,
25 ...declarationKind,
26 };
27}
28exports.normalizeDeclarationKind = normalizeDeclarationKind;