Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions types/activex-adodb/activex-adodb-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const withConnection = (initialCatalog: string, fn: (conn: ADODB.Connection) =>
try {
conn.Open(connectionString);
fn(conn);
} catch (e) {
} catch (e: any) {
WScript.Echo(e.message);
} finally {
if (conn.State === ADODB.ObjectStateEnum.adStateOpen) {
Expand Down Expand Up @@ -134,7 +134,7 @@ const withRs = (
rs = tableOrCommand.Execute() as ADODB.Recordset;
}
fn(rs);
} catch (e) {
} catch (e: any) {
WScript.Echo(e.message);
} finally {
if (rs && rs.State === ADODB.ObjectStateEnum.adStateOpen) {
Expand Down Expand Up @@ -252,7 +252,7 @@ const withEmployees = (fn: (rs: ADODB.Recordset) => void, type: ADODB.CursorType
WScript.Echo(rsContact("ContactName"));
rsContact.MoveNext();
}
} catch (e) {
} catch (e: any) {
WScript.Echo(e.message);
} finally {
if (rsContact && rsContact.State === ADODB.ObjectStateEnum.adStateOpen) {
Expand Down
6 changes: 3 additions & 3 deletions types/activex-msxml2/activex-msxml2-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const MakeDOM = () => {
dom.validateOnParse = false;
dom.resolveExternals = false;
return dom;
} catch (e) {
} catch (e: any) {
WScript.Echo(e.description);
}
};
Expand All @@ -33,7 +33,7 @@ const LoadDOM = (file: string) => {
const dom = MakeDOM()!;
dom.load(file);
return dom;
} catch (e) {
} catch (e: any) {
WScript.Echo(e.description);
}
};
Expand Down Expand Up @@ -171,7 +171,7 @@ const LoadDOM = (file: string) => {
if (nextNode == null) continue;
WScript.Echo(`Node (${i}), <${oNode.nodeName} + ">:\n\t${oNode.xml}`);
}
} catch (e) {
} catch (e: any) {
WScript.Echo(e.description);
}
}
Expand Down
16 changes: 8 additions & 8 deletions types/alt/alt-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ interface TestActionsExplicit {
class AbstractActions implements AltJS.ActionsClass {
constructor(alt: AltJS.Alt) {}
actions: any;
dispatch: (...payload: any[]) => void;
generateActions: (...actions: string[]) => void;
dispatch!: (...payload: any[]) => void;
generateActions!: (...actions: string[]) => void;
}

class AbstractStoreModel<S> implements AltJS.StoreModel<S> {
bindActions: (...actions: Object[]) => void;
bindAction: (...args: any[]) => void;
bindListeners: (obj: any) => void;
exportPublicMethods: (config: { [key: string]: (...args: any[]) => any }) => any;
exportAsync: (source: any) => void;
bindActions!: (...actions: Object[]) => void;
bindAction!: (...args: any[]) => void;
bindListeners!: (obj: any) => void;
exportPublicMethods!: (config: { [key: string]: (...args: any[]) => any }) => any;
exportAsync!: (source: any) => void;
waitFor: any;
exportConfig: any;
getState: () => S;
getState!: () => S;
}

class GenerateActionsClass extends AbstractActions {
Expand Down
2 changes: 1 addition & 1 deletion types/angular-es/angular-es-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ import { InjectAsProperty } from "angular-es";

@InjectAsProperty("fooBar")
class MyFooBarService {
fooBar: Object;
fooBar!: Object;

myMethod() {
this.fooBar !== undefined;
Expand Down
8 changes: 4 additions & 4 deletions types/appletvjs/appletvjs-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ function test_FeatureElement() {
"<menuBar id=\"menuBar\"></menuBar><textField id=\"textField\"></textField>",
"application/xml",
);
var textField = document.getElementById("textField");
textField.addEventListener("change", function() {
var textField = document.getElementById("textField") as unknown as AppleTVJS.FeatureElement;
textField.addEventListener("change", function(this: AppleTVJS.FeatureElement) {
change.call(this, textField);
});

Expand All @@ -42,8 +42,8 @@ function test_FeatureElement() {
var text = keyboard.text;
};

var menuBar = document.getElementById("menuBar");
textField.addEventListener("change", function() {
var menuBar = document.getElementById("menuBar") as unknown as AppleTVJS.FeatureElement;
textField.addEventListener("change", function(this: AppleTVJS.FeatureElement) {
change.call(this, textField);
});

Expand Down
2 changes: 1 addition & 1 deletion types/arangodb/arangodb-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ router.put(
params: JSON.parse(request.body),
});
response.json({ id });
} catch (e) {
} catch (e: any) {
e.error = true;
response.json(e);
}
Expand Down
2 changes: 1 addition & 1 deletion types/ari-client/test/ari-client-tests.externalMedia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { EventEmitter } from "events";

export default class TsgBridge extends EventEmitter {
ariClient: Client;
bridge: Bridge;
bridge!: Bridge;

constructor(ariClient: Client, exten: string, log: any) {
super();
Expand Down
18 changes: 9 additions & 9 deletions types/athenajs/test/tetris/grid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,23 @@ class Grid extends Scene {

// game sprites
// current tetris shape
shape: Shape;
shape!: Shape;
// next tetris shape
nextShape: Shape;
nextShape!: Shape;
// next tetris string
nextString: SimpleText;
nextString!: SimpleText;
// score
scoreString: SimpleText;
scoreString!: SimpleText;
// "line:"
linesString: SimpleText;
linesString!: SimpleText;
// "level:"
levelString: SimpleText;
levelString!: SimpleText;
// "pause:"
pauseString: SimpleText;
pauseString!: SimpleText;
// flashing lines
flashLines: FlashLines;
flashLines!: FlashLines;
// ->, <-
controls: SimpleText;
controls!: SimpleText;

constructor() {
super({
Expand Down
6 changes: 3 additions & 3 deletions types/athenajs/test/tetris/shape.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ interface shapeDescription {
class Shape extends Sprite {
shapes: shapeDescription[];
// current shape
shape: shapeDescription;
shapeName: string;
shape!: shapeDescription;
shapeName!: string;
// current shape rotation
rotation: number;
rotation!: number;

constructor(name: string, options = {}) {
super(name, {
Expand Down
8 changes: 4 additions & 4 deletions types/athenajs/test/tetris/shape_behavior.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ class ShapeBehavior extends Behavior {
ts: number;
LONG_DELAY: number;
SMALL_DELAY: number;
delay: number;
key: number;
timerEnabled: boolean;
startTime: number;
delay!: number;
key!: number;
timerEnabled!: boolean;
startTime!: number;

constructor(sprite: Shape, options?: any) {
super(sprite as Drawable, options);
Expand Down
2 changes: 1 addition & 1 deletion types/atom/atom-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ function testDecoration() {
// DeserializerManager ========================================================
function testDesializerManager() {
class StorableClass {
name: string;
name!: string;

constructor() {}
deserialize() {
Expand Down
4 changes: 2 additions & 2 deletions types/backbone.marionette/backbone.marionette-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ class MyApplication extends Marionette.Application {
this.layoutView = new AppLayoutView();
}

layoutView: AppLayoutView;
mainRegion: Marionette.Region;
layoutView!: AppLayoutView;
mainRegion!: Marionette.Region;

onStart() {
this.mainRegion = new Marionette.Region({ el: "#main" });
Expand Down
28 changes: 14 additions & 14 deletions types/backbone/backbone-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ function test_events() {
}

class PubSub implements Backbone.Events {
on: Backbone.Events_On<PubSub>;
off: Backbone.Events_Off<PubSub>;
trigger: Backbone.Events_Trigger<PubSub>;
bind: Backbone.Events_On<PubSub>;
unbind: Backbone.Events_Off<PubSub>;

once: Backbone.Events_On<PubSub>;
listenTo: Backbone.Events_Listen<PubSub>;
listenToOnce: Backbone.Events_Listen<PubSub>;
stopListening: Backbone.Events_Stop<PubSub>;
on!: Backbone.Events_On<PubSub>;
off!: Backbone.Events_Off<PubSub>;
trigger!: Backbone.Events_Trigger<PubSub>;
bind!: Backbone.Events_On<PubSub>;
unbind!: Backbone.Events_Off<PubSub>;

once!: Backbone.Events_On<PubSub>;
listenTo!: Backbone.Events_Listen<PubSub>;
listenToOnce!: Backbone.Events_Listen<PubSub>;
stopListening!: Backbone.Events_Stop<PubSub>;
}

Object.assign(PubSub.prototype, Backbone.Events);
Expand Down Expand Up @@ -156,7 +156,7 @@ class PrivateNote extends Note {
}

set(attributes: any, options?: any): this {
return Backbone.Model.prototype.set.call(this, attributes, options);
return super.set(attributes, options);
}
}

Expand Down Expand Up @@ -217,9 +217,9 @@ class EmployeeCollection extends Backbone.Collection<Employee> {
}

class Book extends Backbone.Model {
title: string;
author: string;
published: boolean;
title!: string;
author!: string;
published!: boolean;
}

class Library extends Backbone.Collection<Book> {
Expand Down
2 changes: 1 addition & 1 deletion types/bardjs/bardjs-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace myService {
}

class MyController {
myProperty: string;
myProperty!: string;
}

angular
Expand Down
2 changes: 1 addition & 1 deletion types/blessed/blessed-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ const lorem = readFileSync(__dirname + "/git.diff", "utf8");
const cleanSides = screen.cleanSides;
function expectClean(value: any) {
screen.cleanSides = function(el: blessed.Widgets.BlessedElement) {
const ret = cleanSides.apply(this, arguments);
const ret = cleanSides.call(this, el);
if (ret !== value) {
throw new Error(`Failed. Expected ${value} from cleanSides. Got ${ret}.`);
}
Expand Down
2 changes: 1 addition & 1 deletion types/bluebird/bluebird-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ fooOrBarProm = fooProm.caught(Bluebird.CancellationError, (reason: any) => {
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

class CustomError extends Error {
customField: number;
customField!: number;
}
// $ExpectType Bluebird<void | Foo>
fooProm.catch(CustomError, reason => {
Expand Down
2 changes: 1 addition & 1 deletion types/braintree-web/test/web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ braintree.client.create(
});
payload.nonce;
// Submit payload.nonce to your server
} catch (tokenizeErr /*braintree.BraintreeError*/) {
} catch (tokenizeErr: any) {
// Handle tokenization errors or premature flow closure
switch (tokenizeErr.code) {
case "PAYPAL_POPUP_CLOSED":
Expand Down
5 changes: 5 additions & 0 deletions types/buffer-more-ints/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*
!**/*.d.ts
!**/*.d.cts
!**/*.d.mts
!**/*.d.*.ts
Loading