From 1aed2f32346e990df23ed78cc14f7a6307207cc3 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Wed, 28 Apr 2021 11:01:41 +0200 Subject: [PATCH] fix(dev-infra): replace `chalk` require with namespace import (#41847) Since we now use version 4 we can use namespace imports and leverage in build types. PR Close #41847 --- tools/ts-api-guardian/lib/cli.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tools/ts-api-guardian/lib/cli.ts b/tools/ts-api-guardian/lib/cli.ts index 98581b3f46..0ff5cebd5e 100644 --- a/tools/ts-api-guardian/lib/cli.ts +++ b/tools/ts-api-guardian/lib/cli.ts @@ -7,14 +7,11 @@ */ // tslint:disable:no-console - -// TODO(alexeagle): why not import chalk from 'chalk'? -// Something to do with TS default export in UMD emit... -const chalk = require('chalk'); +import * as chalk from 'chalk'; import * as minimist from 'minimist'; import * as path from 'path'; -import {SerializationOptions, generateGoldenFile, verifyAgainstGoldenFile, discoverAllEntrypoints} from './main'; +import {discoverAllEntrypoints, generateGoldenFile, SerializationOptions, verifyAgainstGoldenFile} from './main'; /** Name of the CLI */ const CMD = 'ts-api-guardian';