diff --git a/Makefile b/Makefile index fade539..4f27029 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ test-opencode: node --test opencode/tests/*.test.mjs test-raycast: - cd raycast && npm ci && npm test && npm run lint && npm run build + cd raycast && npm ci && npm test && npm run lint && npm run build && npm run typecheck validate: test git diff --check diff --git a/raycast/package.json b/raycast/package.json index 8178187..e1f9545 100644 --- a/raycast/package.json +++ b/raycast/package.json @@ -86,6 +86,7 @@ "dev": "ray develop", "fix-lint": "ray lint --fix", "lint": "ray lint", + "typecheck": "tsc --noEmit", "test": "tsx --test tests/*.test.ts", "prepublishOnly": "echo \"\\n\\nIt seems like you are trying to publish the Raycast extension to npm.\\n\\nIf you did intend to publish it to npm, remove the \\`prepublishOnly\\` script and rerun \\`npm publish\\` again.\\nIf you wanted to publish it to the Raycast Store instead, use \\`npm run publish\\` instead.\\n\\n\" && exit 1", "publish": "npx @raycast/api@latest publish" diff --git a/raycast/src/search-symbol.tsx b/raycast/src/search-symbol.tsx index e8ff4b2..aab0fd8 100644 --- a/raycast/src/search-symbol.tsx +++ b/raycast/src/search-symbol.tsx @@ -80,7 +80,7 @@ function typedInstrument(query: string, index: SymbolIndex | undefined): Instrum // A typed "^FTSE" is an index whatever its exchange, so the Indices filter keeps it. if (symbol.startsWith("^")) return { symbol, market: "index", kind: "index", name: symbol, exchange: null }; const suffix = /\.([A-Z]+)$/.exec(symbol)?.[1]; - const market = (suffix && SUFFIX_MARKETS[suffix]) ?? "us"; + const market = (suffix ? SUFFIX_MARKETS[suffix] : undefined) ?? "us"; return { symbol, market, kind: "equity", name: symbol, exchange: null }; }