-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,7 +41,7 @@ beforeEach(() => { | |
}; | ||
}); | ||
|
||
const executor: ExecutorType<{}, {}, {}> = async (options) => { | ||
const executor: ExecutorType<{}, {}, {}, void> = async (options) => { | ||
return { status: 'ok', actionId: options.actionId }; | ||
}; | ||
|
||
|
@@ -203,7 +203,9 @@ describe('isActionTypeEnabled', () => { | |
id: 'foo', | ||
name: 'Foo', | ||
minimumLicenseRequired: 'basic', | ||
executor: async () => {}, | ||
executor: async (options) => { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
mikecote
Author
Contributor
|
||
return { status: 'ok', actionId: options.actionId }; | ||
}, | ||
}; | ||
|
||
beforeEach(() => { | ||
|
@@ -258,7 +260,9 @@ describe('ensureActionTypeEnabled', () => { | |
id: 'foo', | ||
name: 'Foo', | ||
minimumLicenseRequired: 'basic', | ||
executor: async () => {}, | ||
executor: async (options) => { | ||
return { status: 'ok', actionId: options.actionId }; | ||
}, | ||
}; | ||
|
||
beforeEach(() => { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,7 +58,7 @@ export function getActionType({ logger }: { logger: Logger }): ServerLogActionTy | |
async function executor( | ||
{ logger }: { logger: Logger }, | ||
execOptions: ServerLogActionTypeExecutorOptions | ||
): Promise<ActionTypeExecutorResult> { | ||
): Promise<ActionTypeExecutorResult<void>> { | ||
This comment has been minimized.
Sorry, something went wrong.
pmuellr
Member
|
||
const actionId = execOptions.actionId; | ||
const params = execOptions.params; | ||
|
||
|
just. a note that we should have a test that returns
undefined
, somewhere, as I think we try to cope with this situation in the calling code - in case the action did the wrong thing. Obviously having this typed helps, maybe enough that we don't need that extra protection anymore?