Add types for new package @microsoft/typescript-etw (#37138)

* Add types for '@microsoft/typescript-etw'

* Add more authors
This commit is contained in:
Michael Crane 2019-07-25 16:20:45 -07:00 committed by Wesley Wigham
parent e244bc5f6b
commit efa2c81aab
4 changed files with 76 additions and 0 deletions

View File

@ -0,0 +1,27 @@
// Type definitions for @microsoft/typescript-etw 0.1
// Project: https://github.com/microsoft/typescript-etw
// Definitions by: Michael Crane <https://github.com/mrcrane>
// Andrew Casey <https://github.com/amcasey>
// Mine Starks <https://github.com/minestarks>
// 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;

View File

@ -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();

View File

@ -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"
]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }