mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Migrate from typedef to explicit-function-return-type
This commit is contained in:
+6
-5
@@ -134,15 +134,16 @@ module.exports = {
|
||||
{ "selector": "typeLike", "format": ["PascalCase"] },
|
||||
{ "selector": "interface", "format": ["PascalCase"], "prefix": ["I"] },
|
||||
],
|
||||
"@typescript-eslint/explicit-function-return-type": [
|
||||
"error",
|
||||
{
|
||||
"allowExpressions": true
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/tslint/config": [
|
||||
"error",
|
||||
{
|
||||
"rules": {
|
||||
"typedef": [
|
||||
true,
|
||||
"call-signature",
|
||||
"parameter"
|
||||
],
|
||||
"whitespace": [
|
||||
true,
|
||||
"check-branch",
|
||||
|
||||
+1
-1
@@ -419,7 +419,7 @@ export class Terminal extends Disposable implements ITerminal, IDisposable, IInp
|
||||
}
|
||||
copyHandler(event, this._selectionService);
|
||||
}));
|
||||
const pasteHandlerWrapper = (event: ClipboardEvent) => handlePasteEvent(event, this.textarea, this.bracketedPasteMode, this._coreService);
|
||||
const pasteHandlerWrapper = (event: ClipboardEvent): void => handlePasteEvent(event, this.textarea, this.bracketedPasteMode, this._coreService);
|
||||
this.register(addDisposableDomListener(this.textarea, 'paste', pasteHandlerWrapper));
|
||||
this.register(addDisposableDomListener(this.element, 'paste', pasteHandlerWrapper));
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ export class MockUnicodeService implements IUnicodeService {
|
||||
versions: string[] = [];
|
||||
activeVersion: string = '';
|
||||
onChange: IEvent<string> = new EventEmitter<string>().event;
|
||||
wcwidth = (codepoint: number) => this._provider.wcwidth(codepoint);
|
||||
wcwidth = (codepoint: number): number => this._provider.wcwidth(codepoint);
|
||||
getStringCellWidth(s: string): number {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ export const VT500_TRANSITION_TABLE = (function (): TransitionTable {
|
||||
// range macro for byte
|
||||
const BYTE_VALUES = 256;
|
||||
const blueprint = Array.apply(null, Array(BYTE_VALUES)).map((unused: any, i: number) => i);
|
||||
const r = (start: number, end: number) => blueprint.slice(start, end);
|
||||
const r = (start: number, end: number): number[] => blueprint.slice(start, end);
|
||||
|
||||
// Default definitions.
|
||||
const PRINTABLES = r(0x20, 0x7f); // 0x20 (SP) included, 0x7F (DEL) excluded
|
||||
|
||||
Reference in New Issue
Block a user