array-binary.test-d.ts
This file
Path
test-d/stdio/option/array-binary.test-d.ts
31 lines · 1.2 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 binaryArray = [new Uint8Array(), new Uint8Array()] as const;
await execa('unicorns', {stdin: [binaryArray]});execaSync('unicorns', {stdin: [binaryArray]});
expectError(await execa('unicorns', {stdout: [binaryArray]}));expectError(execaSync('unicorns', {stdout: [binaryArray]}));
expectError(await execa('unicorns', {stderr: [binaryArray]}));expectError(execaSync('unicorns', {stderr: [binaryArray]}));
await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [binaryArray]]});expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [binaryArray]]}));await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [[binaryArray]]]});expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [[binaryArray]]]}));
expectAssignable<StdinOption>([binaryArray]);expectAssignable<StdinSyncOption>([binaryArray]);
expectNotAssignable<StdoutStderrOption>([binaryArray]);expectNotAssignable<StdoutStderrSyncOption>([binaryArray]);