-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core): fix notice to support type (#375)
Co-authored-by: Wasuwat Limsuparhat <[email protected]>
- Loading branch information
1 parent
ccd76a0
commit cd41db3
Showing
7 changed files
with
41 additions
and
12 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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# `TestDeprecationNotice` | ||
|
||
#### `Test generate simple message` | ||
|
||
```html | ||
Deprecation notice: | ||
test | ||
|
||
``` | ||
|
||
#### `Test generate message with url` | ||
|
||
```html | ||
Deprecation notice: | ||
test | ||
|
||
url | ||
|
||
``` | ||
|
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,9 +1,12 @@ | ||
import { WarningNotice } from './WarningNotice.js'; | ||
import { MESSAGE_TYPE } from './constants.js'; | ||
|
||
/** | ||
* **Deprecation Notice**\ | ||
* Used to show deprecation warnings in the console. | ||
*/ | ||
export class DeprecationNotice extends WarningNotice { | ||
protected type = 'Deprecation'; | ||
constructor (message: string, supportURL?: string, type = MESSAGE_TYPE.DEPRECATION) { | ||
super(message, supportURL, type); | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export enum MESSAGE_TYPE { | ||
NOTICE = 'Information', | ||
DEPRECATION = 'Deprecation', | ||
WARNING = 'Warning' | ||
} |