Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
50 changed files
with
629 additions
and
567 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,15 @@ | ||
{ | ||
"root": true, | ||
"extends": "hexo" | ||
} | ||
"extends": "hexo/ts.js", | ||
"parserOptions": { | ||
"sourceType": "module", | ||
"ecmaVersion": 2020 | ||
}, | ||
"rules": { | ||
"@typescript-eslint/no-unused-vars": 0, | ||
"@typescript-eslint/no-explicit-any": 0, | ||
"@typescript-eslint/no-var-requires": 0, | ||
"@typescript-eslint/ban-ts-comment": 0, | ||
"no-use-before-define": 0 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,5 @@ node_modules/ | |
.nyc_output/ | ||
*.log | ||
docs/ | ||
coverage/ | ||
coverage/ | ||
dist |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,24 @@ | ||
'use strict'; | ||
|
||
class WarehouseError extends Error { | ||
code?: string; | ||
|
||
/** | ||
* WarehouseError constructor | ||
* | ||
* @param {string} msg | ||
* @param {string} code | ||
*/ | ||
constructor(msg, code) { | ||
constructor(msg: string, code?: string) { | ||
super(msg); | ||
|
||
Error.captureStackTrace(this); | ||
|
||
this.code = code; | ||
} | ||
static ID_EXIST = 'ID_EXIST'; | ||
static ID_NOT_EXIST = 'ID_NOT_EXIST'; | ||
static ID_UNDEFINED = 'ID_UNDEFINED'; | ||
} | ||
|
||
WarehouseError.prototype.name = 'WarehouseError'; | ||
WarehouseError.ID_EXIST = 'ID_EXIST'; | ||
WarehouseError.ID_NOT_EXIST = 'ID_NOT_EXIST'; | ||
WarehouseError.ID_UNDEFINED = 'ID_UNDEFINED'; | ||
|
||
module.exports = WarehouseError; | ||
export default WarehouseError; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
'use strict'; | ||
|
||
const WarehouseError = require('../error'); | ||
import WarehouseError from '../error'; | ||
|
||
class PopulationError extends WarehouseError {} | ||
|
||
PopulationError.prototype.name = 'PopulationError'; | ||
|
||
module.exports = PopulationError; | ||
export default PopulationError; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
'use strict'; | ||
|
||
const WarehouseError = require('../error'); | ||
import WarehouseError from '../error'; | ||
|
||
class ValidationError extends WarehouseError {} | ||
|
||
ValidationError.prototype.name = 'ValidationError'; | ||
|
||
module.exports = ValidationError; | ||
export default ValidationError; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.