31 matches across 1 files for TODO lang:TypeScript lang:TypeScript path:fixtures/flight-parcel/src/actions.ts
snippet_mode: auto · sorted by relevance
fixtures/flight-parcel/src/actions.ts TYPESCRIPT 31 matches · showing 5 view file →
3import fs from 'fs/promises';
4
5export interface Todo {
6 id: number;
7 title: string;
· · ·
11}
12
13export async function getTodos(): Promise<Todo[]> {
14 try {
15 let contents = await fs.readFile('todos.json', 'utf8');
· · ·
15 let contents = await fs.readFile('todos.json', 'utf8');
16 return JSON.parse(contents);
17 } catch {
· · ·
18 await fs.writeFile('todos.json', '[]');
19 return [];
20 }
· · ·
21}
22
23export async function getTodo(id: number): Promise<Todo | undefined> {
24 let todos = await getTodos();
25 return todos.find(todo => todo.id === id);
+ 26 more matches in this file
Search syntax
auth loginboth terms (AND is implicit)
auth OR logineither term
NOT path:vendorexclude matches
"exact phrase"quoted exact match
/func\s+Test/regex
handler~1fuzzy (Levenshtein 1)
file:*_test.gofilename glob
path:pkg/auth/**full path glob
lang:golanguage filter

Search any public repo from your terminal

This page calls POST /api/v1/code_search. Same tool, available over MCP for Claude/Cursor/Copilot.