Skip to content

Commit

Permalink
chore: remove withAsync from ContextManager interface
Browse files Browse the repository at this point in the history
  • Loading branch information
vmarchaud committed Apr 12, 2020
1 parent f40f6f1 commit 9cc34de
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 19 deletions.
4 changes: 0 additions & 4 deletions packages/opentelemetry-context-base/src/NoopContextManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ export class NoopContextManager implements types.ContextManager {
return fn();
}

withAsync(context: Context, fn: Function) {
return fn();
}

bind<T>(target: T, context?: Context): T {
return target;
}
Expand Down
11 changes: 0 additions & 11 deletions packages/opentelemetry-context-base/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,6 @@ export interface ContextManager {
fn: T
): ReturnType<T>;

/**
* Run the async fn callback with an active scope
*
* @param scope Context to be active during function invocation
* @param fn An async callback to be immediately run with an active context
*/
withAsync<T extends Promise<any>, U extends (...args: unknown[]) => T>(
scope: Context,
fn: U
): Promise<T>;

/**
* Bind an object as the current context (or a specific one)
* @param target Any object to which a context need to be set
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,4 @@ export class ZoneContextManager implements ContextManager {

return newZone.run(fn, context);
}

withAsync(context: Context, fn: Function) {
return fn();
}
}

0 comments on commit 9cc34de

Please sign in to comment.