ts-error-as-value
Advanced tools
Comparing version 0.2.1 to 0.2.2
{ | ||
"name": "ts-error-as-value", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Errors as values in typescript", | ||
@@ -10,3 +10,3 @@ "main": "lib/index.js", | ||
"preinstall": "npx only-allow yarn && npx rimraf lib", | ||
"start": "node --require ts-node/register --require @babel/register src/index.ts", | ||
"start": "node --require ts-node/register --require @babel/register src/types-scratch-board.ts", | ||
"test": "jest", | ||
@@ -13,0 +13,0 @@ "postinstall": "npx tsc && node cp.js" |
@@ -47,3 +47,3 @@ | ||
function success(): Success; | ||
function success<T>(data: T): Success<T>; | ||
function success<T>(data?: T): Success<T>; | ||
function success<T = void>( | ||
@@ -71,3 +71,3 @@ data: T = undefined as T | ||
export type ResultIs = { | ||
success<T>(data: T): Success<T>, | ||
success<T>(data?: T): Success<T>, | ||
failure<E extends Error>(failure: E): Failure<E> | ||
@@ -74,0 +74,0 @@ }; |
@@ -26,2 +26,3 @@ { | ||
"declaration": true, | ||
"strictNullChecks": true, | ||
"typeRoots": [ | ||
@@ -28,0 +29,0 @@ "./types", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
27425
604