(annotations?: Annotations.Filter)
| 7991 | * @since 4.0.0 |
| 7992 | */ |
| 7993 | export function isInt(annotations?: Annotations.Filter) { |
| 7994 | return makeFilter( |
| 7995 | (n: number) => globalThis.Number.isSafeInteger(n), |
| 7996 | { |
| 7997 | expected: "an integer", |
| 7998 | representation: { |
| 7999 | id: "effect/schema/isInt", |
| 8000 | payload: null |
| 8001 | }, |
| 8002 | toJsonSchema: () => ({ |
| 8003 | type: "integer", |
| 8004 | minimum: globalThis.Number.MIN_SAFE_INTEGER, |
| 8005 | maximum: globalThis.Number.MAX_SAFE_INTEGER |
| 8006 | }), |
| 8007 | arbitraryConstraint: { |
| 8008 | number: "integer" |
| 8009 | }, |
| 8010 | ...annotations |
| 8011 | } |
| 8012 | ) |
| 8013 | } |
| 8014 | /** |
| 8015 | * Type-level representation of {@link Int}. |
| 8016 | * |
no test coverage detected