Skip to content

Commit e4b2acf

Browse files
author
Ifeora Okechukwu
committed
signed-off: updated for comments and references
Signed-off-by: Ifeora Okechukwu <[email protected]>
1 parent 9df9a7a commit e4b2acf

File tree

7 files changed

+97
-93
lines changed

7 files changed

+97
-93
lines changed

packages/openapi-to-graphql/lib/schema_builder.js

+7-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/openapi-to-graphql/lib/schema_builder.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/openapi-to-graphql/lib/utils.d.ts

+8-6
Original file line numberDiff line numberDiff line change
@@ -46,33 +46,35 @@ export declare function isSafeLong(n: unknown): boolean;
4646
*/
4747
export declare function isSafeFloat(n: unknown): boolean;
4848
/**
49-
*
49+
* serialize a date string into the ISO format
5050
*/
5151
export declare function serializeDate(n: string): string;
5252
/**
5353
* verify that a vriable contains a safe date/date-time string
5454
*/
5555
export declare function isSafeDate(n: string): boolean;
5656
/**
57-
*
57+
* verify is a string is a valid URL
5858
*/
5959
export declare function isURL(s: string): boolean;
6060
/**
61-
*
61+
* verify if a string is a valid EMAIL
62+
* See: https://github.com/Urigo/graphql-scalars/blob/master/src/resolvers/EmailAddress.ts#L4
6263
*/
6364
export declare function isEmail(s: string): boolean;
6465
/**
65-
*
66+
* verify if a string is a valid GUID/UUID
67+
* See: https://github.com/Urigo/graphql-scalars/blob/master/src/resolvers/GUID.ts#L4
6668
*/
6769
export declare function isUUIDOrGUID(s: string): boolean;
6870
/**
69-
*
71+
* convert the fist letter of a word in a string to upper case
7072
*/
7173
export declare function ucFirst(s: string): string;
7274
/**
7375
* get the correct type of a variable
7476
*/
75-
export declare function strictTypeOf(value: any, type: any): boolean;
77+
export declare function strictTypeOf(value: unknown, type: string): boolean;
7678
/**
7779
* Utilities that are specific to OpenAPI-to-GraphQL
7880
*/

packages/openapi-to-graphql/lib/utils.js

+32-37
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/openapi-to-graphql/lib/utils.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/openapi-to-graphql/src/types/strict_scalars.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export interface IScalarParseError<TConfig, TCode = string> {
88
config: TConfig
99
}
1010

11-
// may throw
11+
// function type may throw an error
1212

1313
export type ScalarParseErrorHandler<TInternal, TConfig, TCode = string> = (
1414
errorInfo: IScalarParseError<TConfig, TCode>

0 commit comments

Comments
 (0)