Skip to content
5 changes: 5 additions & 0 deletions src/base/common/utilities/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,11 @@ export type Push<Arr extends any[], V> = [...Arr, V];
*/
export type Pop<Arr extends any[]> = Arr extends [...infer Rest, any] ? Rest : never;

/**
* Remove the first of the array (require non empty).
*/
export type Shift<Arr extends any[]> = Arr extends [any, ...infer Rest] ? Rest : never;

/**
* Converts a two-dimensional array type to a one-dimensional array type.
*/
Expand Down
1 change: 1 addition & 0 deletions src/editor/common/editorContextKeys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export namespace EditorContextKeys {
export const editorFocusedContext = CreateContextKeyExpr.Equal('isEditorFocused', true);
export const isEditorReadonly = CreateContextKeyExpr.Equal('isEditorReadonly', true);
export const isEditorWritable = CreateContextKeyExpr.Equal('isEditorWritable', true);
export const isEditorEditable = CreateContextKeyExpr.And(editorFocusedContext, isEditorWritable);
export const richtextEditorMode = CreateContextKeyExpr.Equal('editorRenderMode', EditorType.Rich);
export const plaintextEditorMode = CreateContextKeyExpr.Equal('editorRenderMode', EditorType.Plain);
export const splitViewEditorMode = CreateContextKeyExpr.Equal('editorRenderMode', EditorType.Split);
Expand Down
1 change: 1 addition & 0 deletions src/editor/common/proseMirror.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Selection } from "prosemirror-state";
export {
Step as ProseStep,
ReplaceStep as ProseReplaceStep,
ReplaceAroundStep as ProseReplaceAroundStep,
Mapping as ProseMapping,
StepMap as ProseStepMapping,
} from "prosemirror-transform";
Expand Down
Loading
Loading