mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-04 22:59:42 +02:00
allow json (#1137)
Allow creating .json files. Also added the json language server so syntax highlighting and validation works with the ingame editor
This commit is contained in:
@@ -7,7 +7,7 @@ export type TextFilePath = FilePath & WithTextExtension;
|
||||
|
||||
/** Check extension only */
|
||||
export function hasTextExtension(path: string): path is WithTextExtension {
|
||||
return path.endsWith(".txt");
|
||||
return path.endsWith(".txt") || path.endsWith(".json");
|
||||
}
|
||||
|
||||
/** Sanitize a player input, resolve any relative paths, and for imports add the correct extension if missing */
|
||||
|
||||
Reference in New Issue
Block a user