mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-27 10:03:48 +01:00
Fixes linter/build errors from editing last night in GitHub
This commit is contained in:
parent
df30771744
commit
8d5f80de26
@ -1,7 +1,7 @@
|
|||||||
import { KEY } from "../utils/helpers/keyCodes";
|
import { KEY } from "../utils/helpers/keyCodes";
|
||||||
import { substituteAliases } from "../Alias";
|
import { substituteAliases } from "../Alias";
|
||||||
// Helper function to parse individual arguments into number/boolean/string as appropriate
|
// Helper function to parse individual arguments into number/boolean/string as appropriate
|
||||||
function parseArg(arg) {
|
function parseArg(arg: string): string | number | boolean {
|
||||||
// Handles all numbers including hexadecimal, octal, and binary representations, returning NaN on an unparseable string
|
// Handles all numbers including hexadecimal, octal, and binary representations, returning NaN on an unparseable string
|
||||||
const asNumber = Number(arg);
|
const asNumber = Number(arg);
|
||||||
if (!isNaN(asNumber)) {
|
if (!isNaN(asNumber)) {
|
||||||
@ -46,7 +46,7 @@ export function ParseCommand(command: string): (string | number | boolean)[] {
|
|||||||
const args = [];
|
const args = [];
|
||||||
|
|
||||||
// Track depth of quoted strings, e.g.: "the're 'going away' rather 'quickly \"and awkwardly\"'" should be parsed as a single string
|
// Track depth of quoted strings, e.g.: "the're 'going away' rather 'quickly \"and awkwardly\"'" should be parsed as a single string
|
||||||
const quotes = [];
|
const quotes: string[] = [];
|
||||||
|
|
||||||
let arg = '';
|
let arg = '';
|
||||||
while (idx < command.length) {
|
while (idx < command.length) {
|
||||||
|
Loading…
Reference in New Issue
Block a user