Skip to content

Commit

Permalink
change error to a "deep" type
Browse files Browse the repository at this point in the history
  • Loading branch information
shortercode committed Sep 16, 2024
1 parent 6b2ec67 commit 55ad71c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/plainer.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {
isArray,
isEmptyObject,
isError,
isMap,
isPlainObject,
isPrimitive,
Expand Down Expand Up @@ -95,6 +96,7 @@ const isDeep = (object: any, superJson: SuperJSON): boolean =>
isArray(object) ||
isMap(object) ||
isSet(object) ||
isError(object) ||
isInstanceOfRegisteredClass(object, superJson);

function addIdentity(object: any, path: any[], identities: Map<any, any[][]>) {
Expand Down
3 changes: 1 addition & 2 deletions src/transformer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,14 @@ type LeafTypeAnnotation =
| PrimitiveTypeAnnotation
| 'regexp'
| 'Date'
| 'Error'
| 'URL';

type TypedArrayAnnotation = ['typed-array', string];
type ClassTypeAnnotation = ['class', string];
type SymbolTypeAnnotation = ['symbol', string];
type CustomTypeAnnotation = ['custom', string];

type SimpleTypeAnnotation = LeafTypeAnnotation | 'map' | 'set';
type SimpleTypeAnnotation = LeafTypeAnnotation | 'map' | 'set' | 'Error';

type CompositeTypeAnnotation =
| TypedArrayAnnotation
Expand Down

0 comments on commit 55ad71c

Please sign in to comment.