mirror of
https://github.com/chenasraf/DefinitelyTyped.git
synced 2026-05-18 01:49:01 +00:00
🤖 Merge PR #65630 Update two types for nova-editor-node by @edwardloveall
* Add shell option to TaskProcessAction * Add config option to TaskActionResolveContext
This commit is contained in:
4
types/nova-editor-node/index.d.ts
vendored
4
types/nova-editor-node/index.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
// Type definitions for non-npm package nova-editor-node 5.0
|
||||
// Type definitions for non-npm package nova-editor-node 5.1
|
||||
// Project: https://docs.nova.app/api-reference/
|
||||
// Definitions by: Cameron Little <https://github.com/apexskier>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@@ -822,6 +822,7 @@ declare class Task {
|
||||
|
||||
interface TaskActionResolveContext<T extends Transferrable> {
|
||||
action: TaskName;
|
||||
config: Configuration;
|
||||
readonly data?: T;
|
||||
}
|
||||
|
||||
@@ -845,6 +846,7 @@ declare class TaskProcessAction {
|
||||
cwd?: string;
|
||||
stdio?: ['pipe' | 'ignore', 'pipe' | 'ignore', 'pipe' | 'ignore'] | 'pipe' | 'ignore' | 'jsonrpc' | number;
|
||||
matchers?: ReadonlyArray<string>;
|
||||
shell?: boolean | string;
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@@ -316,6 +316,7 @@ task.setAction(
|
||||
new TaskProcessAction('/usr/bin/say', {
|
||||
args: ["I'm Building!"],
|
||||
env: {},
|
||||
shell: true,
|
||||
}),
|
||||
);
|
||||
|
||||
@@ -481,3 +482,16 @@ nova.assistants.registerTaskAssistant(tasks, {
|
||||
identifier: 'com.my-command',
|
||||
name: 'My command',
|
||||
});
|
||||
|
||||
// Unable to cleanly create a TaskName directly to it need to be built
|
||||
// implicitly with `any` to add the `__type` property then coerced into
|
||||
// `taskName`
|
||||
const tmpTaskName: any = "MyTask";
|
||||
tmpTaskName.__type = "TaskName";
|
||||
const taskName: TaskName = tmpTaskName;
|
||||
|
||||
const taskActionResolveContext: TaskActionResolveContext<any> = {
|
||||
config: nova.config,
|
||||
action: taskName,
|
||||
};
|
||||
taskActionResolveContext.config;
|
||||
|
||||
Reference in New Issue
Block a user