forked from anomalyco/opencode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlang-map.d.ts
More file actions
27 lines (24 loc) · 712 Bytes
/
Copy pathlang-map.d.ts
File metadata and controls
27 lines (24 loc) · 712 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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
}