import {IRawGrammar} from 'vscode-textmate'; import {type Overwrite} from './util.mts'; // vscode-textmate doesn't expose anything else so fine we'll do it ourselves type AllOptionalWritable = { -readonly [K in keyof T]?: T[K] }; type RemoveLocation = Omit; type Cleanup = AllOptionalWritable< RemoveLocation> >; type IRawRepository = IRawGrammar['repository']; type IRawRule = IRawRepository[string]; type IRawCaptures = NonNullable; export type Captures = Cleanup; export type Rule = Cleanup; export type Repository = Cleanup; export type Grammar = Cleanup;