# core/resolvers/shell.resolver.ts

> 12 lines of code and 1 definition.

Tree: Code Parse
Language: typescript
Layer: infrastructure
Canonical: https://banes-lab.com/anatomy/code-parse#file-code-parse-core-resolvers-shell-resolver-ts
Source text: https://banes-lab.com/source/code-parse/core/resolvers/shell.resolver.ts.txt

Listed in [core/resolvers](https://banes-lab.com/api/source/code-parse/core/resolvers.md), after [core/resolvers/grammar.resolver.ts](https://banes-lab.com/source/code-parse/core/resolvers/grammar.resolver.ts.md).

## Definitions

- `invocationFor` (lexical_declaration, line 4, exported)

## Contained in

- [core/resolvers](https://banes-lab.com/anatomy/code-parse/folder-code-parse-core-resolvers.md)

## Source

```typescript
import { WINDOWS, WINDOWS_SHELL, WINDOWS_SHELL_FLAGS } from "#configuration/constants/shell.constants";
import type { Invocation } from "#types/shell.types";

export const invocationFor = function invocationFor(
    platform: string,
    name: string,
    args: readonly string[],
): Invocation {
    if (platform !== WINDOWS) {
        return { args, file: name };
    }
    return { args: [...WINDOWS_SHELL_FLAGS, name, ...args], file: WINDOWS_SHELL };
};
```
