mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
Fix new lint failures (#31553)
This commit is contained in:
parent
996c4a2f1f
commit
444ae0e622
4
types/acorn/index.d.ts
vendored
4
types/acorn/index.d.ts
vendored
@ -246,9 +246,7 @@ declare namespace acorn {
|
||||
let LooseParser: ILooseParserClass | undefined;
|
||||
let pluginsLoose: PluginsObject | undefined;
|
||||
|
||||
interface ILooseParserClass {
|
||||
new (input: string, options?: Options): ILooseParser;
|
||||
}
|
||||
type ILooseParserClass = new (input: string, options?: Options) => ILooseParser;
|
||||
|
||||
interface ILooseParser {}
|
||||
|
||||
|
||||
@ -438,10 +438,10 @@ test("simple tracer built on contexts", function (t) {
|
||||
this.harvester = harvester;
|
||||
}
|
||||
runHandler(callback: any) {
|
||||
const wrapped = tracer.bind(function () {
|
||||
const wrapped = tracer.bind(() => {
|
||||
callback();
|
||||
this.harvester.emit('finished', tracer.get('transaction'));
|
||||
}.bind(this));
|
||||
});
|
||||
wrapped();
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,7 +6,7 @@ if (fns["Array.prototype.includes"]) {
|
||||
}
|
||||
const syntax = es.syntax();
|
||||
if (syntax["Arrow function"]) {
|
||||
new Function("() => {}");
|
||||
// new Function("() => {}");
|
||||
}
|
||||
|
||||
if (fns.es2017.__all && syntax.es2017.__all) {
|
||||
|
||||
@ -37,7 +37,7 @@ import * as prefs from "sdk/simple-prefs";
|
||||
type prefType = {pref1: string};
|
||||
(prefs.prefs as prefType)["pref1"] = "value";
|
||||
prefs.on("pref1", () => console.log("pref1 changed"));
|
||||
prefs.removeListener("pref1", new Function());
|
||||
prefs.removeListener("pref1", () => {});
|
||||
|
||||
import * as storage from "sdk/simple-storage";
|
||||
storage.storage.value = 10;
|
||||
|
||||
@ -121,12 +121,12 @@ sql = mysql.format(sql, inserts);
|
||||
|
||||
connection.config.queryFormat = function(query, values) {
|
||||
if (!values) return query;
|
||||
return query.replace(/\:(\w+)/g, function(txt: string, key: string) {
|
||||
return query.replace(/\:(\w+)/g, (txt: string, key: string) => {
|
||||
if (values.hasOwnProperty(key)) {
|
||||
return this.escape(values[key]);
|
||||
}
|
||||
return txt;
|
||||
}.bind(this));
|
||||
});
|
||||
};
|
||||
|
||||
connection.query("UPDATE posts SET title = :title", {title: "Hello MySQL"});
|
||||
|
||||
@ -252,11 +252,11 @@ class Example extends React.Component<any, any> {
|
||||
getColumns() {
|
||||
var clonedColumns = columns.slice();
|
||||
clonedColumns[2].events = {
|
||||
onClick: function (ev:React.SyntheticEvent<any>, args:{idx:number, rowIdx:number}) {
|
||||
onClick: (ev:React.SyntheticEvent<any>, args:{idx:number, rowIdx:number}) => {
|
||||
var idx = args.idx;
|
||||
var rowIdx = args.rowIdx;
|
||||
this.refs.grid.openCellEditor(rowIdx, idx);
|
||||
}.bind(this)
|
||||
(this.refs.grid as ReactDataGrid<{}>).openCellEditor(rowIdx, idx);
|
||||
}
|
||||
};
|
||||
|
||||
return clonedColumns;
|
||||
|
||||
@ -198,11 +198,11 @@ class Example extends React.Component<any, any> {
|
||||
getColumns() {
|
||||
var clonedColumns = columns.slice();
|
||||
clonedColumns[2].events = {
|
||||
onClick: function (ev:React.SyntheticEvent<any>, args:{idx:number, rowIdx:number}) {
|
||||
onClick: (ev:React.SyntheticEvent<any>, args:{idx:number, rowIdx:number}) => {
|
||||
var idx = args.idx;
|
||||
var rowIdx = args.rowIdx;
|
||||
this.refs.grid.openCellEditor(rowIdx, idx);
|
||||
}.bind(this)
|
||||
(this.refs.grid as ReactDataGrid)
|
||||
}
|
||||
};
|
||||
|
||||
return clonedColumns;
|
||||
|
||||
@ -252,11 +252,11 @@ class Example extends React.Component<any, any> {
|
||||
getColumns() {
|
||||
var clonedColumns = columns.slice();
|
||||
clonedColumns[2].events = {
|
||||
onClick: function (ev:React.SyntheticEvent<any>, args:{idx:number, rowIdx:number}) {
|
||||
onClick: (ev:React.SyntheticEvent<any>, args:{idx:number, rowIdx:number}) => {
|
||||
var idx = args.idx;
|
||||
var rowIdx = args.rowIdx;
|
||||
this.refs.grid.openCellEditor(rowIdx, idx);
|
||||
}.bind(this)
|
||||
(this.refs.grid as ReactDataGrid).openCellEditor(rowIdx, idx);
|
||||
}
|
||||
};
|
||||
|
||||
return clonedColumns;
|
||||
|
||||
@ -102,17 +102,17 @@ export default class DocViewerExample extends React.Component {
|
||||
<View>
|
||||
<Text>Doc Viewer React Native</Text>
|
||||
<Button
|
||||
onPress={this.handlePress.bind(this)}
|
||||
onPress={this.handlePress}
|
||||
title="Press Me Open Doc Url"
|
||||
accessibilityLabel="See a Document"
|
||||
/>
|
||||
<Button
|
||||
onPress={this.handlePressBinaryinUrl.bind(this)}
|
||||
onPress={this.handlePressBinaryinUrl}
|
||||
title="Press Me Open BinaryinUrl"
|
||||
accessibilityLabel="See a Document"
|
||||
/>
|
||||
<Button
|
||||
onPress={this.handlePressb64.bind(this)}
|
||||
onPress={this.handlePressb64}
|
||||
title="Press Me Open Base64 String"
|
||||
accessibilityLabel="See a Document"
|
||||
/>
|
||||
|
||||
@ -401,7 +401,7 @@ Page({
|
||||
this.setData({
|
||||
animationData:animation.export()
|
||||
})
|
||||
}.bind(this), 1000)
|
||||
}, 1000)
|
||||
},
|
||||
rotateAndScale: function () {
|
||||
// 旋转同时放大
|
||||
|
||||
Loading…
Reference in New Issue
Block a user