array-object.test-d.ts
This file
Path
test-d/stdio/option/array-object.test-d.ts
31 lines · 1.1 KiB · TypeScript
Last changed by
Rename a few more types (#1012)ehmickybefore adoption55175e8
History of this fileTake it
1234567891011121314151617181920212223242526272829303132import {expectError, expectAssignable, expectNotAssignable} from 'tsd';import { execa, execaSync, type StdinOption, type StdinSyncOption, type StdoutStderrOption, type StdoutStderrSyncOption,} from '../../../index.js';
const objectArray = [{}, {}] as const;
await execa('unicorns', {stdin: [objectArray]});execaSync('unicorns', {stdin: [objectArray]});
expectError(await execa('unicorns', {stdout: [objectArray]}));expectError(execaSync('unicorns', {stdout: [objectArray]}));
expectError(await execa('unicorns', {stderr: [objectArray]}));expectError(execaSync('unicorns', {stderr: [objectArray]}));
await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [objectArray]]});expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [objectArray]]}));await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [[objectArray]]]});expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [[objectArray]]]}));
expectAssignable<StdinOption>([objectArray]);expectAssignable<StdinSyncOption>([objectArray]);
expectNotAssignable<StdoutStderrOption>([objectArray]);expectNotAssignable<StdoutStderrSyncOption>([objectArray]);