File tree Expand file tree Collapse file tree
src/extensions/codemirror/hooks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,16 +32,17 @@ const supportedModes = {
3232 javascript,
3333} as const ;
3434
35- const v6AdaptedModes = new Map ( [
35+ export const supportedCodeEditorModes = Object . keys ( supportedModes ) as Array < keyof typeof supportedModes > ;
36+ export type SupportedCodeEditorModes = ( typeof supportedCodeEditorModes ) [ number ] ;
37+
38+ const v6AdaptedModes : ReadonlyMap < SupportedCodeEditorModes , boolean > = new Map ( [
3639 [ "json" , true ] ,
3740 [ "markdown" , true ] ,
3841 [ "xml" , true ] ,
3942 [ "sql" , true ] ,
4043 [ "yaml" , true ] ,
4144 [ "javascript" , true ] ,
4245] ) ;
43- export const supportedCodeEditorModes = Object . keys ( supportedModes ) as Array < keyof typeof supportedModes > ;
44- export type SupportedCodeEditorModes = ( typeof supportedCodeEditorModes ) [ number ] ;
4546
4647export const useCodeMirrorModeExtension = ( mode ?: SupportedCodeEditorModes ) => {
4748 return ! mode
You can’t perform that action at this time.
0 commit comments