Add docs comments and tests for TypeScript definitions (#299)

Fixes #293
This commit is contained in:
George Gkasdrogkas 2018-12-26 03:06:00 +02:00 committed by Sindre Sorhus
parent f590a65489
commit 90c7a92ff1
9 changed files with 438 additions and 169 deletions

View file

@ -199,7 +199,7 @@ function applyStyle(...args) {
}
function chalkTag(chalk, ...strings) {
const firstString = strings[0];
const [firstString] = strings;
if (!Array.isArray(firstString)) {
// If chalk() was called by itself or with a string,