Skip to content

Commit

Permalink
resolve merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
mkslanc committed May 29, 2024
1 parent 1ee5cae commit 4855d92
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 21 deletions.
4 changes: 2 additions & 2 deletions ace-ext.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@ declare module "ace-code/src/ext/textarea" {
string
], onLoad: (module: any) => void) => void;
setModuleLoader: (moduleName: any, onLoad: any) => void;
version: "1.33.0";
version: "1.34.2";
};
edit: (el: string | (HTMLElement & {
env?: any;
Expand All @@ -804,7 +804,7 @@ declare module "ace-code/src/ext/textarea" {
EditSession: typeof ace.EditSession;
UndoManager: typeof ace.UndoManager;
VirtualRenderer: typeof ace.VirtualRenderer;
version: "1.33.0";
version: "1.34.2";
transformTextarea: (element: any, options: any) => ace.Editor;
defaultOptions: {
mode: string;
Expand Down
1 change: 1 addition & 0 deletions ace-internal.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@ export namespace Ace {
enableMultiselect: boolean;
enableKeyboardAccessibility: boolean;
enableCodeLens: boolean;
textInputAriaLabel: string;
}

interface EventsBase {
Expand Down
2 changes: 1 addition & 1 deletion ace-lib.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ declare module "ace-code/src/lib/deep_copy" {
}
declare module "ace-code/src/lib/lang" {
export function last(a: any): any;
export function stringReverse(string: any): any;
export function stringReverse(string: string): string;
export function stringRepeat(string: any, count: any): string;
export function stringTrimLeft(string: any): any;
export function stringTrimRight(string: any): any;
Expand Down
13 changes: 7 additions & 6 deletions ace-modules.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ declare module "ace-code/src/config" {
string
], onLoad: (module: any) => void) => void;
setModuleLoader: (moduleName: any, onLoad: any) => void;
version: "1.33.0";
version: "1.34.2";
};
export = _exports;
import AppConfig_1 = require("ace-code/src/lib/app_config");
Expand Down Expand Up @@ -4831,7 +4831,8 @@ declare module "ace-code/src/background_tokenizer" {
/**@type {false|number}*/
running: false | number;
lines: any[];
states: any[];
/**@type {string[]|string[][]}*/
states: string[] | string[][];
currentLine: number;
tokenizer: import("ace-code/src/tokenizer").Tokenizer;
/**
Expand Down Expand Up @@ -4873,9 +4874,9 @@ declare module "ace-code/src/background_tokenizer" {
/**
* Returns the state of tokenization at the end of a row.
* @param {Number} row The row to get state at
* @returns {string}
* @returns {string | string[]}
**/
getState(row: number): string;
getState(row: number): string | string[];
cleanup(): void;
}
export type Document = import("ace-code/src/document").Document;
Expand Down Expand Up @@ -5241,10 +5242,10 @@ declare module "ace-code/src/edit_session" {
/**
* {:BackgroundTokenizer.getState}
* @param {Number} row The row to start at
* @returns {string}
* @returns {string | string[]}
* @related BackgroundTokenizer.getState
**/
getState(row: number): string;
getState(row: number): string | string[];
/**
* Starts tokenizing at the row indicated. Returns a list of objects of the tokenized rows.
* @param {Number} row The row to start at
Expand Down
18 changes: 9 additions & 9 deletions ace.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ declare module "ace-code" {
openingBracketBlock(session: EditSession, bracket: string, row: number, column: number, typeRe?: RegExp): Range | undefined;
closingBracketBlock(session: EditSession, bracket: string, row: number, column: number, typeRe?: RegExp): Range | undefined;
}
type BehaviorAction = (state: string, action: string, editor: Editor, session: EditSession, text: string | Range) => ({
type BehaviorAction = (state: string | string[], action: string, editor: Editor, session: EditSession, text: string | Range) => ({
text: string;
selection: number[];
} | Range) & {
Expand Down Expand Up @@ -716,18 +716,18 @@ declare module "ace-code" {
transformAction: BehaviorAction;
path?: string;
getTokenizer(): Tokenizer;
toggleCommentLines(state: any, session: EditSession, startRow: number, endRow: number): void;
toggleBlockComment(state: any, session: EditSession, range: Range, cursor: Point): void;
getNextLineIndent(state: any, line: string, tab: string): string;
checkOutdent(state: any, line: string, input: string): boolean;
autoOutdent(state: any, doc: EditSession, row: number): void;
toggleCommentLines(state: string | string[], session: EditSession, startRow: number, endRow: number): void;
toggleBlockComment(state: string | string[], session: EditSession, range: Range, cursor: Point): void;
getNextLineIndent(state: string | string[], line: string, tab: string): string;
checkOutdent(state: string | string[], line: string, input: string): boolean;
autoOutdent(state: string | string[], doc: EditSession, row: number): void;
// TODO implement WorkerClient types
createWorker(session: EditSession): any;
createModeDelegates(mapping: {
[key: string]: string;
}): void;
getKeywords(append?: boolean): Array<string | RegExp>;
getCompletions(state: string, session: EditSession, pos: Point, prefix: string): Completion[];
getCompletions(state: string | string[], session: EditSession, pos: Point, prefix: string): Completion[];
}
interface OptionsBase {
[key: string]: any;
Expand Down Expand Up @@ -981,7 +981,7 @@ declare module "ace-code" {
string
], onLoad: (module: any) => void) => void;
setModuleLoader: (moduleName: any, onLoad: any) => void;
version: "1.33.0";
version: "1.34.2";
};
export function edit(el: string | (HTMLElement & {
env?: any;
Expand All @@ -998,6 +998,6 @@ declare module "ace-code" {
import UndoManager = UndoManager_2.UndoManager;
import Renderer_1 = require("ace-code/src/virtual_renderer");
import Renderer = Renderer_1.VirtualRenderer;
export var version: "1.33.0";
export var version: "1.34.2";
export { Range, Editor, EditSession, UndoManager, Renderer as VirtualRenderer };
}
4 changes: 1 addition & 3 deletions src/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,7 @@ class Editor {
getKeyboardHandler() {
return this.keyBinding.getKeyboardHandler();
}




/**
* Sets a new editsession to use. This method also emits the `'changeSession'` event.
* @param {EditSession} [session] The new session to use
Expand Down
2 changes: 2 additions & 0 deletions src/lib/lang.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ exports.last = function(a) {
return a[a.length - 1];
};


/** @param {string} string */
exports.stringReverse = function(string) {
return string.split("").reverse().join("");
};
Expand Down

0 comments on commit 4855d92

Please sign in to comment.