summaryrefslogtreecommitdiff
path: root/alarm/node_modules/graphql/utilities/coerceInputValue.d.ts
diff options
context:
space:
mode:
Diffstat (limited to 'alarm/node_modules/graphql/utilities/coerceInputValue.d.ts')
-rw-r--r--alarm/node_modules/graphql/utilities/coerceInputValue.d.ts17
1 files changed, 17 insertions, 0 deletions
diff --git a/alarm/node_modules/graphql/utilities/coerceInputValue.d.ts b/alarm/node_modules/graphql/utilities/coerceInputValue.d.ts
new file mode 100644
index 0000000..45c70a5
--- /dev/null
+++ b/alarm/node_modules/graphql/utilities/coerceInputValue.d.ts
@@ -0,0 +1,17 @@
+import { GraphQLInputType } from '../type/definition';
+import { GraphQLError } from '../error/GraphQLError';
+
+type OnErrorCB = (
+ path: ReadonlyArray<string | number>,
+ invalidValue: any,
+ error: GraphQLError,
+) => void;
+
+/**
+ * Coerces a JavaScript value given a GraphQL Input Type.
+ */
+export function coerceInputValue(
+ inputValue: any,
+ type: GraphQLInputType,
+ onError?: OnErrorCB,
+): any;