Skip to content

Commit

Permalink
fix: change Level from const enum to enum to benefit JS users
Browse files Browse the repository at this point in the history
  • Loading branch information
lisaychuang committed Aug 5, 2018
1 parent 5a1f184 commit e061607
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import logStyles, { CLEAR_STYLE } from './styles';
import { isBrowser } from './utils';

// Log levels (lower number are more severe)
export const enum Level {
export enum Level {
error = 1,
warn = 2,
log = 3,
Expand Down
4 changes: 2 additions & 2 deletions test/exports-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ QUnit.test('Logger as a default export', assert => {
assert.equal(typeof BL.default, 'function', 'it\'s a function');
assert.deepEqual(
Object.keys(BL),
['default'],
'aside from types, there is a "default" export'
['default', 'Level'],
'aside from types, there is a "default" and "Level" export'
);
assert.deepEqual(
typeof BL.default.prototype,
Expand Down

0 comments on commit e061607

Please sign in to comment.