Changed to default export in Typescript definition
This commit is contained in:
parent
e35b732597
commit
a4d6a513f1
2 changed files with 6 additions and 2 deletions
2
types/index.d.ts
vendored
2
types/index.d.ts
vendored
|
|
@ -1,7 +1,7 @@
|
||||||
// Type definitions for Chalk
|
// Type definitions for Chalk
|
||||||
// Definitions by: Thomas Sauer <https://github.com/t-sauer>
|
// Definitions by: Thomas Sauer <https://github.com/t-sauer>
|
||||||
|
|
||||||
export = chalk;
|
export default chalk;
|
||||||
|
|
||||||
declare function chalk(...text: string[]): string;
|
declare function chalk(...text: string[]): string;
|
||||||
declare function chalk(text: TemplateStringsArray, ...placeholders: string[]): string;
|
declare function chalk(text: TemplateStringsArray, ...placeholders: string[]): string;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import * as chalk from '..';
|
import chalk from '..';
|
||||||
|
|
||||||
chalk.underline('foo');
|
chalk.underline('foo');
|
||||||
chalk.red('foo');
|
chalk.red('foo');
|
||||||
|
|
@ -22,6 +22,10 @@ ctx('foo');
|
||||||
ctx.red('foo');
|
ctx.red('foo');
|
||||||
ctx`foo`;
|
ctx`foo`;
|
||||||
|
|
||||||
|
chalk.enabled = true;
|
||||||
|
chalk.level = 1;
|
||||||
|
chalk.level = chalk.Level.Extended;
|
||||||
|
|
||||||
chalk.level === chalk.Level.Extended;
|
chalk.level === chalk.Level.Extended;
|
||||||
|
|
||||||
chalk.enabled;
|
chalk.enabled;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue