Skip to content

Commit

Permalink
Enable exactOptionalPropertyTypes
Browse files Browse the repository at this point in the history
  • Loading branch information
lydell committed Aug 19, 2023
1 parent 57746ba commit d70a312
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
12 changes: 5 additions & 7 deletions run-pty.js
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ const drawDashboardCommandLines = (
) => {
const lines = commands.map((command) => {
const [icon, status] = statusText(command.status, {
statusFromRules: command.statusFromRules,
statusFromRules: command.statusFromRules ?? runningIndicator,
useSeparateKilledIndicator,
});
const { label = " " } = command;
Expand Down Expand Up @@ -486,6 +486,7 @@ const drawSummary = (commands) => {
: "aborted";
const lines = commands.map((command) => {
const [indicator, status] = statusText(command.status, {
statusFromRules: runningIndicator,
useSeparateKilledIndicator: true,
});
return `${indicator}${EMOJI_WIDTH_FIX} ${
Expand Down Expand Up @@ -651,15 +652,12 @@ ${cwdText(command)}${command.history}${CLEAR_DOWN}${newline}${bold(

/**
* @param {Status} status
* @param {{ statusFromRules?: string, useSeparateKilledIndicator?: boolean }} options
* @param {{ statusFromRules: string, useSeparateKilledIndicator: boolean }} options
* @returns {[string, string | undefined]}
*/
const statusText = (
status,
{
statusFromRules = runningIndicator,
useSeparateKilledIndicator = false,
} = {}
{ statusFromRules, useSeparateKilledIndicator }
) => {
switch (status.tag) {
case "Waiting":
Expand Down Expand Up @@ -882,7 +880,7 @@ const AUTO_EXIT_REGEX = /^--auto-exit(?:=(\d+|auto))?$/;
cwd: string,
command: Array<string>,
status: Array<[RegExp, [string, string] | undefined]>,
defaultStatus?: [string, string],
defaultStatus?: [string, string] | undefined,
killAllSequence: string,
}} CommandDescription
*
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"allowJs": true,
"allowSyntheticDefaultImports": true,
"checkJs": true,
"exactOptionalPropertyTypes": true,
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
"module": "CommonJS",
Expand Down

0 comments on commit d70a312

Please sign in to comment.