Skip to content

Commit

Permalink
Accept null values (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
robiot committed Jun 3, 2023
1 parent 1336915 commit cfdd305
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"license": "LGPL-3.0-or-later",
"devDependencies": {
"@types/jest": "^27.0.2",
"@types/node": "^18.11.17",
"@typescript-eslint/eslint-plugin": "^5.9.0",
"@typescript-eslint/parser": "^5.9.0",
"chalk": "^4.1.2",
Expand Down
6 changes: 4 additions & 2 deletions src/ScylloTranslator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@ export type ScylloSafeType =
| bigint
| types.Long
| boolean
| object;
| object
| null;
export type ValidDataType =
| string
| number
| bigint
| boolean
| types.Long
| string[]
| object;
| object
| null;

export const toScyllo: (a: ValidDataType) => ScylloSafeType = (a) => {
if (a instanceof types.Long) return a;
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,11 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.10.3.tgz#7a8f2838603ea314d1d22bb3171d899e15c57bd5"
integrity sha512-ho3Ruq+fFnBrZhUYI46n/bV2GjwzSkwuT4dTf0GkuNFmnb8nq4ny2z9JEVemFi6bdEJanHLlYfy9c6FN9B9McQ==

"@types/node@^18.11.17":
version "18.16.16"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.16.16.tgz#3b64862856c7874ccf7439e6bab872d245c86d8e"
integrity sha512-NpaM49IGQQAUlBhHMF82QH80J08os4ZmyF9MkpCzWAGuOHqE4gTEbhzd7L3l5LmWuZ6E0OiC1FweQ4tsiW35+g==

"@types/normalize-package-data@^2.4.0":
version "2.4.1"
resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301"
Expand Down

0 comments on commit cfdd305

Please sign in to comment.