Skip to content

Commit 2f29f0c

Browse files
authored
Fix packages for TS 6.0 strict=true (DefinitelyTyped#74479)
1 parent 5dd7bec commit 2f29f0c

File tree

164 files changed

+603
-592
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

164 files changed

+603
-592
lines changed

types/activex-adodb/activex-adodb-tests.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ const withConnection = (initialCatalog: string, fn: (conn: ADODB.Connection) =>
9696
try {
9797
conn.Open(connectionString);
9898
fn(conn);
99-
} catch (e) {
99+
} catch (e: any) {
100100
WScript.Echo(e.message);
101101
} finally {
102102
if (conn.State === ADODB.ObjectStateEnum.adStateOpen) {
@@ -134,7 +134,7 @@ const withRs = (
134134
rs = tableOrCommand.Execute() as ADODB.Recordset;
135135
}
136136
fn(rs);
137-
} catch (e) {
137+
} catch (e: any) {
138138
WScript.Echo(e.message);
139139
} finally {
140140
if (rs && rs.State === ADODB.ObjectStateEnum.adStateOpen) {
@@ -252,7 +252,7 @@ const withEmployees = (fn: (rs: ADODB.Recordset) => void, type: ADODB.CursorType
252252
WScript.Echo(rsContact("ContactName"));
253253
rsContact.MoveNext();
254254
}
255-
} catch (e) {
255+
} catch (e: any) {
256256
WScript.Echo(e.message);
257257
} finally {
258258
if (rsContact && rsContact.State === ADODB.ObjectStateEnum.adStateOpen) {

types/activex-msxml2/activex-msxml2-tests.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const MakeDOM = () => {
2323
dom.validateOnParse = false;
2424
dom.resolveExternals = false;
2525
return dom;
26-
} catch (e) {
26+
} catch (e: any) {
2727
WScript.Echo(e.description);
2828
}
2929
};
@@ -33,7 +33,7 @@ const LoadDOM = (file: string) => {
3333
const dom = MakeDOM()!;
3434
dom.load(file);
3535
return dom;
36-
} catch (e) {
36+
} catch (e: any) {
3737
WScript.Echo(e.description);
3838
}
3939
};
@@ -171,7 +171,7 @@ const LoadDOM = (file: string) => {
171171
if (nextNode == null) continue;
172172
WScript.Echo(`Node (${i}), <${oNode.nodeName} + ">:\n\t${oNode.xml}`);
173173
}
174-
} catch (e) {
174+
} catch (e: any) {
175175
WScript.Echo(e.description);
176176
}
177177
}

types/angular-es/angular-es-tests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ import { InjectAsProperty } from "angular-es";
9595

9696
@InjectAsProperty("fooBar")
9797
class MyFooBarService {
98-
fooBar: Object;
98+
fooBar!: Object;
9999

100100
myMethod() {
101101
this.fooBar !== undefined;

types/appletvjs/appletvjs-tests.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ function test_FeatureElement() {
3131
"<menuBar id=\"menuBar\"></menuBar><textField id=\"textField\"></textField>",
3232
"application/xml",
3333
);
34-
var textField = document.getElementById("textField");
35-
textField.addEventListener("change", function() {
34+
var textField = document.getElementById("textField") as unknown as AppleTVJS.FeatureElement;
35+
textField.addEventListener("change", function(this: AppleTVJS.FeatureElement) {
3636
change.call(this, textField);
3737
});
3838

@@ -42,8 +42,8 @@ function test_FeatureElement() {
4242
var text = keyboard.text;
4343
};
4444

45-
var menuBar = document.getElementById("menuBar");
46-
textField.addEventListener("change", function() {
45+
var menuBar = document.getElementById("menuBar") as unknown as AppleTVJS.FeatureElement;
46+
textField.addEventListener("change", function(this: AppleTVJS.FeatureElement) {
4747
change.call(this, textField);
4848
});
4949

types/arangodb/arangodb-tests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ router.put(
117117
params: JSON.parse(request.body),
118118
});
119119
response.json({ id });
120-
} catch (e) {
120+
} catch (e: any) {
121121
e.error = true;
122122
response.json(e);
123123
}

types/ari-client/test/ari-client-tests.externalMedia.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { EventEmitter } from "events";
66

77
export default class TsgBridge extends EventEmitter {
88
ariClient: Client;
9-
bridge: Bridge;
9+
bridge!: Bridge;
1010

1111
constructor(ariClient: Client, exten: string, log: any) {
1212
super();

types/athenajs/test/tetris/grid.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,23 @@ class Grid extends Scene {
3131

3232
// game sprites
3333
// current tetris shape
34-
shape: Shape;
34+
shape!: Shape;
3535
// next tetris shape
36-
nextShape: Shape;
36+
nextShape!: Shape;
3737
// next tetris string
38-
nextString: SimpleText;
38+
nextString!: SimpleText;
3939
// score
40-
scoreString: SimpleText;
40+
scoreString!: SimpleText;
4141
// "line:"
42-
linesString: SimpleText;
42+
linesString!: SimpleText;
4343
// "level:"
44-
levelString: SimpleText;
44+
levelString!: SimpleText;
4545
// "pause:"
46-
pauseString: SimpleText;
46+
pauseString!: SimpleText;
4747
// flashing lines
48-
flashLines: FlashLines;
48+
flashLines!: FlashLines;
4949
// ->, <-
50-
controls: SimpleText;
50+
controls!: SimpleText;
5151

5252
constructor() {
5353
super({

types/athenajs/test/tetris/shape.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ interface shapeDescription {
1212
class Shape extends Sprite {
1313
shapes: shapeDescription[];
1414
// current shape
15-
shape: shapeDescription;
16-
shapeName: string;
15+
shape!: shapeDescription;
16+
shapeName!: string;
1717
// current shape rotation
18-
rotation: number;
18+
rotation!: number;
1919

2020
constructor(name: string, options = {}) {
2121
super(name, {

types/athenajs/test/tetris/shape_behavior.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ class ShapeBehavior extends Behavior {
1313
ts: number;
1414
LONG_DELAY: number;
1515
SMALL_DELAY: number;
16-
delay: number;
17-
key: number;
18-
timerEnabled: boolean;
19-
startTime: number;
16+
delay!: number;
17+
key!: number;
18+
timerEnabled!: boolean;
19+
startTime!: number;
2020

2121
constructor(sprite: Shape, options?: any) {
2222
super(sprite as Drawable, options);

types/atom/atom-tests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ function testDecoration() {
654654
// DeserializerManager ========================================================
655655
function testDesializerManager() {
656656
class StorableClass {
657-
name: string;
657+
name!: string;
658658

659659
constructor() {}
660660
deserialize() {

0 commit comments

Comments
 (0)