UNPKG

609 BTypeScriptView Raw
1import type {Result, SyncResult} from '../return/result.js';
2
3type TemplateExpressionItem =
4 | string
5 | number
6 | Result
7 | SyncResult;
8
9/**
10Value allowed inside `${...}` when using the template string syntax.
11*/
12export type TemplateExpression = TemplateExpressionItem | readonly TemplateExpressionItem[];
13
14// `...${...}...` template syntax
15export type TemplateString = readonly [TemplateStringsArray, ...readonly TemplateExpression[]];
16
17// `...${...}...` template syntax, but only allowing a single argument, for `execaCommand()`
18export type SimpleTemplateString = readonly [TemplateStringsArray, string?];