Flow-Wing
Publisher: kushagraThemes in package: 1
Language support for Flow-Wing (.fg): syntax highlighting, theme, IntelliSense, diagnostics, and format-on-save via the Flow-Wing compiler (VS Code, Cursor, VSCodium / Open VSX).
Language support for Flow-Wing (.fg): syntax highlighting, theme, IntelliSense, diagnostics, and format-on-save via the Flow-Wing compiler (VS Code, Cursor, VSCodium / Open VSX).
Full workbench mockup using this variant's colors and tokenColors.
Loading...
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| keyword.control.fg, keyword.declaration.fg, keyword.other.fg, keyword.control.import.fg | #569CD6 | — |
| storage.type.primitive.fg, storage.modifier.fg | #4EC9B0 | — |
| entity.name.type.fg, entity.name.function.fg, entity.name.function.call.fg | #DCDCAA | — |
| string.quoted.double.fg, string.quoted.template.fg, constant.character.fg | #CE9178 | — |
| constant.numeric.integer.fg, constant.numeric.float.fg, constant.numeric.hex.fg | #B5CEA8 | — |
| constant.language.boolean.fg, constant.language.null.fg | #569CD6 | — |
| keyword.operator.arithmetic.fg, keyword.operator.comparison.fg, keyword.operator.logical.fg, keyword.operator.assignment.fg, keyword.operator.arrow.fg, keyword.operator.member.fg, keyword.operator.namespace.fg | #D4D4D4 | — |
| comment.line.double-slash.fg, comment.block.fg | #6A9955 | italic |
| variable.language.self.fg, variable.language.super.fg | #9CDCFE | — |
| constant.character.escape.fg | #D7BA7D | — |
export interface User {
id: string;
name: string;
role: "admin" | "member";
tags: string[];
}
/**
* Fetch user data by ID
* @param id
* @returns User object or null if ID is invalid
*/
export async function fetchUser(id: string): Promise<User | null> {
if (!id) {
return null;
}
const response = await fetch(`/api/users/${id}`, {
method: "GET",
headers: { Accept: "application/json" },
});
if (!response.ok) {
throw new Error(`HTTP ${response.status}`);
}
return (await response.json()) as User;
}
function greet(user: User): string {
// Simple greeting function that uses the user's name
return `Hello, ${user.name}!`;
}