Cleanup from tslint 5.14

This commit is contained in:
Nathan Shively-Sanders 2019-03-13 10:00:20 -07:00
parent 729bada5c3
commit e8b76b6884
25 changed files with 47 additions and 47 deletions

View File

@ -7,7 +7,7 @@
type Params =
| Array<[string, string | ReadonlyArray<string>]>
| {[key: string]: string | ReadonlyArray<string>};
export {Params};
export { Params };
export interface TokenOptions {
scheme: string;

View File

@ -20,7 +20,7 @@ class Assert {
static passedTests: number = 0;
static Results() {
console.log('Tests succeeded - ' + this.passedTests + '/' + this.totalTests + '; Tests failed - ' + (this.totalTests - this.passedTests) + '/' + this.totalTests);
console.log('Tests succeeded - ' + Assert.passedTests + '/' + Assert.totalTests + '; Tests failed - ' + (Assert.totalTests - Assert.passedTests) + '/' + Assert.totalTests);
}
static AssertionFailed(actual: any, expected: any, test: string) {
@ -28,21 +28,21 @@ class Assert {
}
static Equal(actual: any, expected: any, test?: string) {
this.totalTests++;
Assert.totalTests++;
if (actual === expected) {
this.passedTests++;
Assert.passedTests++;
return;
}
this.AssertionFailed(actual, expected, test);
Assert.AssertionFailed(actual, expected, test);
}
static NotEqual(actual: any, expected: any, test?: string) {
this.totalTests++;
Assert.totalTests++;
if (actual !== expected) {
this.passedTests++;
Assert.passedTests++;
return;
}
this.AssertionFailed(actual, expected, test);
Assert.AssertionFailed(actual, expected, test);
}
}

View File

@ -24,4 +24,4 @@
import MDCFoundation, { MDCNumbers, MDCStrings } from './foundation';
import MDCComponent from './component';
export {MDCNumbers, MDCStrings, MDCFoundation, MDCComponent};
export { MDCNumbers, MDCStrings, MDCFoundation, MDCComponent };

View File

@ -27,7 +27,7 @@ import { MDCSelectionControl } from 'material__selection-control';
import MDCCheckboxFoundation from './foundation';
import { MDCRipple } from 'material__ripple';
export {MDCCheckboxAdapter, MDCCheckboxFoundation};
export { MDCCheckboxAdapter, MDCCheckboxFoundation };
export class MDCCheckbox extends MDCComponent<MDCCheckboxAdapter, MDCCheckboxFoundation> implements MDCSelectionControl {
static attachTo(root: Element): MDCCheckbox;

View File

@ -25,7 +25,7 @@ import MDCDialogFoundation from './foundation';
import MDCDialogAdapter from './adapter';
import * as util from './util';
export {MDCDialogAdapter, MDCDialogFoundation, util};
export { MDCDialogAdapter, MDCDialogFoundation, util };
export class MDCDialog extends MDCComponent<MDCDialogAdapter, MDCDialogFoundation> {
static attachTo(root: Element): MDCDialog;

View File

@ -29,4 +29,4 @@
import * as ponyfill from './ponyfill';
export {ponyfill};
export { ponyfill };

View File

@ -26,7 +26,7 @@ import MDCFormFieldFoundation from './foundation';
import MDCFormFieldAdapter from './adapter';
import { MDCSelectionControl } from 'material__selection-control';
export {MDCFormFieldAdapter, MDCFormFieldFoundation};
export { MDCFormFieldAdapter, MDCFormFieldFoundation };
export class MDCFormField extends MDCComponent<MDCFormFieldAdapter, MDCFormFieldFoundation> {
static attachTo(root: Element): MDCFormField;

View File

@ -26,7 +26,7 @@ import MDCIconToggleFoundation from './foundation';
import MDCIconToggleAdapter from './adapter';
import { MDCRipple } from 'material__ripple';
export {MDCIconToggleAdapter, MDCIconToggleFoundation};
export { MDCIconToggleAdapter, MDCIconToggleFoundation };
export class MDCIconToggle extends MDCComponent<MDCIconToggleAdapter, MDCIconToggleFoundation> {
static attachTo(root: Element): MDCIconToggle;

View File

@ -51,4 +51,4 @@ export class MDCList {
getDefaultFoundation(): MDCListFoundation;
}
export { MDCListFoundation};
export { MDCListFoundation };

View File

@ -27,7 +27,7 @@ import MDCRadioAdapter from './adapter';
import MDCRadioFoundation from './foundation';
import { MDCRipple } from 'material__ripple';
export {MDCRadioAdapter, MDCRadioFoundation};
export { MDCRadioAdapter, MDCRadioFoundation };
export class MDCRadio extends MDCComponent<MDCRadioAdapter, MDCRadioFoundation> implements MDCSelectionControl {
static attachTo(root: Element): MDCRadio;

View File

@ -26,7 +26,7 @@ import MDCRippleAdapter from './adapter';
import MDCRippleFoundation from './foundation';
import * as util from './util';
export {MDCRippleAdapter, MDCRippleFoundation, util};
export { MDCRippleAdapter, MDCRippleFoundation, util };
export class MDCRipple extends MDCComponent<MDCRippleAdapter, MDCRippleFoundation> {
static attachTo(root: Element, options?: { isUnbounded?: boolean; }): MDCRipple;

View File

@ -26,7 +26,7 @@ import MDCSelectAdapter from './adapter';
import { MDCFloatingLabel } from 'material__floating-label';
import { MDCLineRipple } from 'material__line-ripple';
export {MDCSelectAdapter, MDCSelectFoundation};
export { MDCSelectAdapter, MDCSelectFoundation };
export class MDCSelect extends MDCComponent<MDCSelectAdapter, MDCSelectFoundation> {
static attachTo(root: Element): MDCSelect;

View File

@ -25,7 +25,7 @@ import MDCComponent from 'material__base/component';
import MDCSliderFoundation from './foundation';
import MDCSliderAdapter from './adapter';
export {MDCSliderAdapter, MDCSliderFoundation};
export { MDCSliderAdapter, MDCSliderFoundation };
export class MDCSlider extends MDCComponent<MDCSliderAdapter, MDCSliderFoundation> {
static attachTo(root: Element): MDCSlider;

View File

@ -24,7 +24,7 @@ import { MDCComponent } from 'material__base';
import MDCSnackbarAdapter from './adapter';
import MDCSnackbarFoundation, { MDCSnackbarData } from './foundation';
export {MDCSnackbarAdapter, MDCSnackbarFoundation};
export { MDCSnackbarAdapter, MDCSnackbarFoundation };
export class MDCSnackbar extends MDCComponent<MDCSnackbarAdapter, MDCSnackbarFoundation> {
static attachTo(root: Element): MDCSnackbar;

View File

@ -20,7 +20,7 @@ import { MDCTab } from '../tab';
import MDCTabBarFoundation from './foundation';
import MDCTabBarAdapter from './adapter';
export {MDCTabBarAdapter, MDCTabBarFoundation};
export { MDCTabBarAdapter, MDCTabBarFoundation };
export class MDCTabBar extends MDCComponent<MDCTabBarAdapter, MDCTabBarFoundation> {
static attachTo(root: Element): MDCTabBar;

View File

@ -18,7 +18,7 @@ import MDCComponent from 'material__base/component';
import MDCTabFoundation from './foundation';
import MDCTabAdapter from './adapter';
export {MDCTabAdapter, MDCTabFoundation};
export { MDCTabAdapter, MDCTabFoundation };
export class MDCTab extends MDCComponent<MDCTabAdapter, MDCTabFoundation> {
static attachTo(root: Element): MDCTab;

View File

@ -20,7 +20,7 @@ import MDCComponent from 'material__base/component';
import MDCTextFieldHelperTextAdapter from './adapter';
import MDCTextFieldHelperTextFoundation from './foundation';
export {MDCTextFieldHelperTextAdapter, MDCTextFieldHelperTextFoundation};
export { MDCTextFieldHelperTextAdapter, MDCTextFieldHelperTextFoundation };
export class MDCTextFieldHelperText extends MDCComponent<MDCTextFieldHelperTextAdapter, MDCTextFieldHelperTextFoundation> {
static attachTo(root: Element): MDCTextFieldHelperText;

View File

@ -25,7 +25,7 @@ import { MDCComponent } from 'material__base';
import MDCToolbarFoundation from './foundation';
import MDCToolbarAdapter from './adapter';
export {MDCToolbarAdapter, MDCToolbarFoundation};
export { MDCToolbarAdapter, MDCToolbarFoundation };
export class MDCToolbar extends MDCComponent<MDCToolbarAdapter, MDCToolbarFoundation> {
static attachTo(root: Element): MDCToolbar;

View File

@ -84,7 +84,7 @@ class AccessToken extends Nodal.Model {
new AccessToken({
user_id: user.get('id'),
access_token: this.generateAccessTokenString(user.get('id'), user.get('email'), new Date().valueOf()),
access_token: AccessToken.generateAccessTokenString(user.get('id'), user.get('email'), new Date().valueOf()),
token_type: 'bearer',
expires_at: (new Date(new Date().valueOf() + (30 * 24 * 60 * 60 * 1000))),
ip_address: params.ip_address
@ -94,7 +94,7 @@ class AccessToken extends Nodal.Model {
}
public static verify (params: any, callback: Function) {
this.query()
AccessToken.query()
.join('user')
.where({
access_token: params.auth.access_token,
@ -116,7 +116,7 @@ class AccessToken extends Nodal.Model {
}
public static logout (params: any, callback: Function) {
this.verify(params, (err: Error, accessToken: AccessToken) => {
AccessToken.verify(params, (err: Error, accessToken: AccessToken) => {
if (err) {
return callback(err);
}

View File

@ -53,4 +53,4 @@ export class Server {
}
export const version: [number, number, number];
export {mime};
export { mime };

View File

@ -8,7 +8,7 @@ import { Element } from 'ltx';
import { EventEmitter } from 'events';
// fixme: not ideal
export {createElement, Element, escapeXML, escapeXMLText} from 'ltx';
export { createElement, Element, escapeXML, escapeXMLText } from 'ltx';
export class Connection extends EventEmitter {
constructor(opts?: any);

View File

@ -800,14 +800,14 @@ namespace util_tests {
}
static test(): void {
var cfn = util.callbackify(this.fn);
var cfnE = util.callbackify(this.fnE);
var cfnT1 = util.callbackify(this.fnT1);
var cfnT1E = util.callbackify(this.fnT1E);
var cfnTResult = util.callbackify(this.fnTResult);
var cfnTResultE = util.callbackify(this.fnTResultE);
var cfnT1TResult = util.callbackify(this.fnT1TResult);
var cfnT1TResultE = util.callbackify(this.fnT1TResultE);
var cfn = util.callbackify(callbackifyTest.fn);
var cfnE = util.callbackify(callbackifyTest.fnE);
var cfnT1 = util.callbackify(callbackifyTest.fnT1);
var cfnT1E = util.callbackify(callbackifyTest.fnT1E);
var cfnTResult = util.callbackify(callbackifyTest.fnTResult);
var cfnTResultE = util.callbackify(callbackifyTest.fnTResultE);
var cfnT1TResult = util.callbackify(callbackifyTest.fnT1TResult);
var cfnT1TResultE = util.callbackify(callbackifyTest.fnT1TResultE);
cfn((err: NodeJS.ErrnoException, ...args: string[]) => assert(err === null && args.length === 1 && args[0] === undefined));
cfnE((err: NodeJS.ErrnoException, ...args: string[]) => assert(err.message === 'fail' && args.length === 0));

View File

@ -826,14 +826,14 @@ namespace util_tests {
}
static test(): void {
var cfn = util.callbackify(this.fn);
var cfnE = util.callbackify(this.fnE);
var cfnT1 = util.callbackify(this.fnT1);
var cfnT1E = util.callbackify(this.fnT1E);
var cfnTResult = util.callbackify(this.fnTResult);
var cfnTResultE = util.callbackify(this.fnTResultE);
var cfnT1TResult = util.callbackify(this.fnT1TResult);
var cfnT1TResultE = util.callbackify(this.fnT1TResultE);
var cfn = util.callbackify(callbackifyTest.fn);
var cfnE = util.callbackify(callbackifyTest.fnE);
var cfnT1 = util.callbackify(callbackifyTest.fnT1);
var cfnT1E = util.callbackify(callbackifyTest.fnT1E);
var cfnTResult = util.callbackify(callbackifyTest.fnTResult);
var cfnTResultE = util.callbackify(callbackifyTest.fnTResultE);
var cfnT1TResult = util.callbackify(callbackifyTest.fnT1TResult);
var cfnT1TResultE = util.callbackify(callbackifyTest.fnT1TResultE);
cfn((err: NodeJS.ErrnoException, ...args: string[]) => assert(err === null && args.length === 1 && args[0] === undefined));
cfnE((err: NodeJS.ErrnoException, ...args: string[]) => assert(err.message === 'fail' && args.length === 0));

View File

@ -17,7 +17,7 @@ class Client implements IClient {
public clientSecret: string;
static findOne(client: IClient, callback: (err: any, client: Client) => void): void {
callback(null, new this);
callback(null, new Client);
}
}
//#endregion

2
types/q/index.d.ts vendored
View File

@ -331,7 +331,7 @@ declare namespace Q {
/**
* Alias for fcall()
*/
export {fcall as try};
export { fcall as try };
/**
* Returns a promise for the result of calling the named method of an object with the given variadic arguments.