@litert/core
Advanced tools
Comparing version 0.2.0 to 0.3.0
# Changes Logs | ||
## v0.3.0 | ||
- Upgrade to TypeScript 2.7. | ||
- Added property **origin** for Exception class. | ||
## v0.2.0 | ||
@@ -4,0 +9,0 @@ |
@@ -8,2 +8,4 @@ /** | ||
protected _type: string; | ||
protected _origin: any; | ||
readonly origin: any; | ||
readonly type: string; | ||
@@ -24,3 +26,3 @@ /** | ||
*/ | ||
constructor(error: number, message: string); | ||
constructor(error: number, message: string, origin?: any); | ||
__toString(): string; | ||
@@ -27,0 +29,0 @@ /** |
@@ -21,2 +21,5 @@ "use strict"; | ||
class Exception { | ||
get origin() { | ||
return this._origin; | ||
} | ||
get type() { | ||
@@ -43,5 +46,6 @@ return this._type; | ||
*/ | ||
constructor(error, message) { | ||
constructor(error, message, origin) { | ||
this._errno = error; | ||
this._message = message; | ||
this._origin = origin; | ||
} | ||
@@ -48,0 +52,0 @@ __toString() { |
{ | ||
"name": "@litert/core", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"description": "The core of LiteRT.", | ||
@@ -31,4 +31,4 @@ "main": "dist/index.js", | ||
"devDependencies": { | ||
"typescript": "^2.6.1" | ||
"typescript": "^2.7.0" | ||
} | ||
} |
# LiteRT/Core | ||
[![npm version](https://img.shields.io/npm/v/@litert/core.svg?colorB=brightgreen)](https://www.npmjs.com/package/@litert/core "Stable Version") | ||
[![License](https://img.shields.io/npm/l/@litert/core.svg?maxAge=2592000?style=plastic)](https://github.com/litert/core/blob/master/LICENSE) | ||
[![GitHub issues](https://img.shields.io/github/issues/litert/core.js.svg)](https://github.com/litert/core.js/issues) | ||
[![GitHub Releases](https://img.shields.io/github/release/litert/core.js.svg)](https://github.com/litert/core.js/releases "Stable Release") | ||
The core of LiteRT. | ||
@@ -4,0 +9,0 @@ |
@@ -25,4 +25,11 @@ /* | ||
protected _type: string; | ||
protected _type!: string; | ||
protected _origin: any; | ||
public get origin(): any { | ||
return this._origin; | ||
} | ||
public get type(): string { | ||
@@ -55,6 +62,7 @@ | ||
*/ | ||
public constructor(error: number, message: string) { | ||
public constructor(error: number, message: string, origin?: any) { | ||
this._errno = error; | ||
this._message = message; | ||
this._origin = origin; | ||
} | ||
@@ -61,0 +69,0 @@ |
@@ -39,3 +39,3 @@ /* | ||
*/ | ||
public reject: IPromiseRejector<E>; | ||
public reject!: IPromiseRejector<E>; | ||
@@ -47,3 +47,3 @@ /** | ||
*/ | ||
public resolve: IPromiseResolver<T>; | ||
public resolve!: IPromiseResolver<T>; | ||
@@ -50,0 +50,0 @@ /** |
Sorry, the diff of this file is not supported yet
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
25726
327
19