Hermione 8.9.4 - как расширить тип TestFunctionCtx #939
-
|
На этапе инициализации гермионы плагинами и хуками в контекст тестовой функции добавляются некоторые поля - раньше тип можно было расширить через Как теперь это можно сделать для типа TestFunctionCtx? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
|
Привет. Посмотрю сегодня. |
Beta Was this translation helpful? Give feedback.
-
|
В итоге очень просто (для hermione/8.9.5): Я пытался именно в hermione модуле аугментировать, но через него не получалось) |
Beta Was this translation helpful? Give feedback.
-
|
Starting with import type { TestFunctionCtx as TestplaneTestFunctionCtx } from "testplane";
declare module 'testplane' {
export interface TestFunctionCtx extends TestplaneTestFunctionCtx {
myFunc(var1: string, var2: number): Promise<void>;
}
}Also |
Beta Was this translation helpful? Give feedback.
Starting with
[email protected], you can do this:Also
TestFunctionCtxis exported directly from "testplane" module.