|
Last change
on this file since a762898 was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago |
|
Added visualizations
|
-
Property mode
set to
100644
|
|
File size:
589 bytes
|
| Rev | Line | |
|---|
| [a762898] | 1 | /**
|
|---|
| 2 | * Prints a warning in the console if it exists.
|
|---|
| 3 | *
|
|---|
| 4 | * @param message The warning message.
|
|---|
| 5 | */
|
|---|
| 6 | export default function warning(message: string): void {
|
|---|
| 7 | /* eslint-disable no-console */
|
|---|
| 8 | if (typeof console !== 'undefined' && typeof console.error === 'function') {
|
|---|
| 9 | console.error(message)
|
|---|
| 10 | }
|
|---|
| 11 | /* eslint-enable no-console */
|
|---|
| 12 | try {
|
|---|
| 13 | // This error was thrown as a convenience so that if you enable
|
|---|
| 14 | // "break on all exceptions" in your console,
|
|---|
| 15 | // it would pause the execution at this line.
|
|---|
| 16 | throw new Error(message)
|
|---|
| 17 | } catch (e) {} // eslint-disable-line no-empty
|
|---|
| 18 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.