appsync-scalars 0.1.2 → 0.1.4

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 (2) hide show
  1. package/index.d.ts +6 -0
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -6,9 +6,15 @@ export class AppSyncScalarError extends Error {
6
6
  constructor(scalar: AppSyncScalar, reason: string);
7
7
  }
8
8
 
9
+ // A value already of the right type gets a plain boolean, because a type guard would narrow the
10
+ // false branch to never. Anything else is narrowed when the check passes.
11
+ export function isAWSDate(value: string): boolean;
9
12
  export function isAWSDate(value: unknown): value is string;
13
+ export function isAWSTime(value: string): boolean;
10
14
  export function isAWSTime(value: unknown): value is string;
15
+ export function isAWSDateTime(value: string): boolean;
11
16
  export function isAWSDateTime(value: unknown): value is string;
17
+ export function isAWSTimestamp(value: number | bigint): boolean;
12
18
  export function isAWSTimestamp(value: unknown): value is number | bigint;
13
19
 
14
20
  /** @throws {AppSyncScalarError} if the value is invalid. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appsync-scalars",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "Validates AWS AppSync date and time scalar values.",
5
5
  "keywords": ["appsync", "aws", "graphql", "validation", "iso8601"],
6
6
  "license": "MIT",