Skip to content

Commit

Permalink
refector: rename prototype to base
Browse files Browse the repository at this point in the history
  • Loading branch information
alvis committed Feb 3, 2024
1 parent 1704ffe commit 34ae52b
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion source/prototype.ts → source/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* See the LICENSE file for details.
* -------------------------------------------------------------------------
*
* @summary
* @summary Base class for Xception
*
* @author Alvis HT Tang <alvis@hilbert.space>
* @license MIT
Expand Down
4 changes: 2 additions & 2 deletions source/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

/* istanbul ignore file */

export * from './prototype';
export { Xception as default } from './prototype';
export * from './base';
export { Xception as default } from './base';

export * from './render';
export { default as xception } from './xception';
4 changes: 2 additions & 2 deletions source/xception.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
* -------------------------------------------------------------------------
*/

import { Xception } from '#base';
import { isErrorLike } from '#isErrorLike';
import { Xception } from '#prototype';
import { $meta, $namespace, $tags } from '#symbols';

import type { XceptionOptions } from '#base';
import type { ErrorLike } from '#isErrorLike';
import type { XceptionOptions } from '#prototype';

type Options = Omit<XceptionOptions, 'cause'> & {
factory?: (message: string, options: XceptionOptions) => Xception;
Expand Down
2 changes: 1 addition & 1 deletion spec/prototype.spec.ts → spec/base.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* -------------------------------------------------------------------------
*/

import { Xception } from '#prototype';
import { Xception } from '#base';
import { $cause, $meta, $namespace, $tags } from '#symbols';

class NewError extends Xception {
Expand Down
2 changes: 1 addition & 1 deletion spec/render.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class MockedError extends Error {
this.stack = stack;
}
}
const { Xception } = await import('#prototype');
const { Xception } = await import('#base');
const { renderError } = await import('#render');
describe('fn:renderError', () => {
it('should render an error stack with its own format', () => {
Expand Down
2 changes: 1 addition & 1 deletion spec/xception.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* -------------------------------------------------------------------------
*/

import { Xception } from '#prototype';
import { Xception } from '#base';

import { $meta } from '#symbols';
import xception from '#xception';
Expand Down

0 comments on commit 34ae52b

Please sign in to comment.