diff options
| author | Jay V <[email protected]> | 2025-06-27 13:25:15 -0400 |
|---|---|---|
| committer | Jay V <[email protected]> | 2025-06-27 13:25:15 -0400 |
| commit | 391c837b37de57cb182cbfadda143299b02e4472 (patch) | |
| tree | 5d79c9ab600f1e797dbe6c04369fb3ac35178e48 /packages/web/src/types | |
| parent | 5773d9d1a3fc32eb857c245a23cde51e7a6b7690 (diff) | |
| download | opencode-391c837b37de57cb182cbfadda143299b02e4472.tar.gz opencode-391c837b37de57cb182cbfadda143299b02e4472.zip | |
docs: share page write tool bug
Diffstat (limited to 'packages/web/src/types')
| -rw-r--r-- | packages/web/src/types/lang-map.d.ts | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/packages/web/src/types/lang-map.d.ts b/packages/web/src/types/lang-map.d.ts index e69de29bb..b21d2a005 100644 --- a/packages/web/src/types/lang-map.d.ts +++ b/packages/web/src/types/lang-map.d.ts @@ -0,0 +1,27 @@ +declare module "lang-map" { + /** Returned by calling `map()` */ + export interface MapReturn { + /** All extensions keyed by language name */ + extensions: Record<string, string[]>; + /** All languages keyed by file-extension */ + languages: Record<string, string[]>; + } + + /** + * Calling `map()` gives you the raw lookup tables: + * + * ```js + * const { extensions, languages } = map(); + * ``` + */ + function map(): MapReturn; + + /** Static method: get extensions for a given language */ + namespace map { + function extensions(language: string): string[]; + /** Static method: get languages for a given extension */ + function languages(extension: string): string[]; + } + + export = map; +} |
