From efa2c81aab45781062001effc5e0c29221580435 Mon Sep 17 00:00:00 2001 From: Michael Crane Date: Thu, 25 Jul 2019 16:20:45 -0700 Subject: [PATCH] Add types for new package @microsoft/typescript-etw (#37138) * Add types for '@microsoft/typescript-etw' * Add more authors --- types/microsoft__typescript-etw/index.d.ts | 27 +++++++++++++++++++ .../microsoft__typescript-etw-tests.ts | 22 +++++++++++++++ types/microsoft__typescript-etw/tsconfig.json | 26 ++++++++++++++++++ types/microsoft__typescript-etw/tslint.json | 1 + 4 files changed, 76 insertions(+) create mode 100644 types/microsoft__typescript-etw/index.d.ts create mode 100644 types/microsoft__typescript-etw/microsoft__typescript-etw-tests.ts create mode 100644 types/microsoft__typescript-etw/tsconfig.json create mode 100644 types/microsoft__typescript-etw/tslint.json diff --git a/types/microsoft__typescript-etw/index.d.ts b/types/microsoft__typescript-etw/index.d.ts new file mode 100644 index 0000000000..6f9322552e --- /dev/null +++ b/types/microsoft__typescript-etw/index.d.ts @@ -0,0 +1,27 @@ +// Type definitions for @microsoft/typescript-etw 0.1 +// Project: https://github.com/microsoft/typescript-etw +// Definitions by: Michael Crane +// Andrew Casey +// Mine Starks +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export function logEvent(msg: string): void; +export function logErrEvent(msg: string): void; +export function logPerfEvent(msg: string): void; +export function logInfoEvent(msg: string): void; +export function logStartCommand(command: string, msg: string): void; +export function logStopCommand(command: string, msg: string): void; +export function logStartUpdateProgram(msg: string): void; +export function logStopUpdateProgram(msg: string): void; +export function logStartUpdateGraph(): void; +export function logStopUpdateGraph(): void; +export function logStartResolveModule(name: string): void; +export function logStopResolveModule(success: string): void; +export function logStartParseSourceFile(filename: string): void; +export function logStopParseSourceFile(): void; +export function logStartReadFile(filename: string): void; +export function logStopReadFile(): void; +export function logStartBindFile(filename: string): void; +export function logStopBindFile(): void; +export function logStartScheduledOperation(operationId: string): void; +export function logStopScheduledOperation(): void; diff --git a/types/microsoft__typescript-etw/microsoft__typescript-etw-tests.ts b/types/microsoft__typescript-etw/microsoft__typescript-etw-tests.ts new file mode 100644 index 0000000000..1e78f0b268 --- /dev/null +++ b/types/microsoft__typescript-etw/microsoft__typescript-etw-tests.ts @@ -0,0 +1,22 @@ +import etw = require ('@microsoft/typescript-etw'); + +etw.logEvent('message'); +etw.logErrEvent('message'); +etw.logPerfEvent('message'); +etw.logInfoEvent('message'); +etw.logStartCommand('command', 'message'); +etw.logStopCommand('command', 'message'); +etw.logStartUpdateProgram('message'); +etw.logStopUpdateProgram('message'); +etw.logStartUpdateGraph(); +etw.logStopUpdateGraph(); +etw.logStartResolveModule('name'); +etw.logStopResolveModule('success'); +etw.logStartParseSourceFile('filename'); +etw.logStopParseSourceFile(); +etw.logStartReadFile('filename'); +etw.logStopReadFile(); +etw.logStartBindFile('filename'); +etw.logStopBindFile(); +etw.logStartScheduledOperation('operationId'); +etw.logStopScheduledOperation(); diff --git a/types/microsoft__typescript-etw/tsconfig.json b/types/microsoft__typescript-etw/tsconfig.json new file mode 100644 index 0000000000..cc09b1c2a4 --- /dev/null +++ b/types/microsoft__typescript-etw/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "paths": { + "@microsoft/typescript-etw": ["microsoft__typescript-etw"] + } + }, + "files": [ + "index.d.ts", + "microsoft__typescript-etw-tests.ts" + ] +} diff --git a/types/microsoft__typescript-etw/tslint.json b/types/microsoft__typescript-etw/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/microsoft__typescript-etw/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }