Skip to content

Commit 626b431

Browse files
committed
Merge branch 'master' into error-node-static-index-signatures
2 parents 7a9854c + 58a6692 commit 626b431

File tree

256 files changed

+10678
-4204
lines changed

Some content is hidden

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

256 files changed

+10678
-4204
lines changed

.eslintrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
],
3535

3636
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
37+
"@typescript-eslint/consistent-type-assertions": ["error", { "assertionStyle": "as" }],
3738

3839
"no-duplicate-imports": "off",
3940
"@typescript-eslint/no-duplicate-imports": "error",

.github/workflows/codeql.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ jobs:
2020
# a pull request then we can checkout the head.
2121
fetch-depth: 2
2222

23-
# If this run was triggered by a pull request event, then checkout
24-
# the head of the pull request instead of the merge commit.
25-
- run: git checkout HEAD^2
26-
if: ${{ github.event_name == 'pull_request' }}
27-
2823
# Initializes the CodeQL tools for scanning.
2924
- name: Initialize CodeQL
3025
uses: github/codeql-action/init@v1

.github/workflows/sync-wiki.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Sync Two Wiki Repos
2+
3+
on: [gollum]
4+
5+
jobs:
6+
sync:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Get repo name
10+
run: R=${GITHUB_REPOSITORY%?wiki}; echo "BASENAME=${R##*/}" >> $GITHUB_ENV
11+
- name: Checkout ${{ env.BASENAME }}-wiki
12+
uses: actions/checkout@v2
13+
with:
14+
repository: "${{ GITHUB.repository_owner }}/${{ env.BASENAME }}-wiki"
15+
token: ${{ secrets.TS_BOT_GITHUB_TOKEN }}
16+
fetch-depth: 0
17+
- name: Run sync
18+
run: ./.github/workflows/sync
19+
env:
20+
PUSHER: typescript-bot <[email protected]>
21+
AUTH: ${{ secrets.TS_BOT_GITHUB_TOKEN }}

package-lock.json

Lines changed: 131 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/buildProtocol.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class DeclarationsWalker {
4747
}
4848
if (s.name === "Array" || s.name === "ReadOnlyArray") {
4949
// we should process type argument instead
50-
return this.processType((<any>type).typeArguments[0]);
50+
return this.processType((type as any).typeArguments[0]);
5151
}
5252
else {
5353
const declarations = s.getDeclarations();
@@ -84,12 +84,12 @@ class DeclarationsWalker {
8484
case ts.SyntaxKind.PropertySignature:
8585
case ts.SyntaxKind.Parameter:
8686
case ts.SyntaxKind.IndexSignature:
87-
if (((<ts.VariableDeclaration | ts.MethodDeclaration | ts.PropertyDeclaration | ts.ParameterDeclaration | ts.PropertySignature | ts.MethodSignature | ts.IndexSignatureDeclaration>node.parent).type) === node) {
87+
if (((node.parent as ts.VariableDeclaration | ts.MethodDeclaration | ts.PropertyDeclaration | ts.ParameterDeclaration | ts.PropertySignature | ts.MethodSignature | ts.IndexSignatureDeclaration).type) === node) {
8888
this.processTypeOfNode(node);
8989
}
9090
break;
9191
case ts.SyntaxKind.InterfaceDeclaration:
92-
const heritageClauses = (<ts.InterfaceDeclaration>node.parent).heritageClauses;
92+
const heritageClauses = (node.parent as ts.InterfaceDeclaration).heritageClauses;
9393
if (heritageClauses) {
9494
if (heritageClauses[0].token !== ts.SyntaxKind.ExtendsKeyword) {
9595
throw new Error(`Unexpected kind of heritage clause: ${ts.SyntaxKind[heritageClauses[0].kind]}`);
@@ -106,7 +106,7 @@ class DeclarationsWalker {
106106

107107
private processTypeOfNode(node: ts.Node): void {
108108
if (node.kind === ts.SyntaxKind.UnionType) {
109-
for (const t of (<ts.UnionTypeNode>node).types) {
109+
for (const t of (node as ts.UnionTypeNode).types) {
110110
this.processTypeOfNode(t);
111111
}
112112
}
@@ -120,7 +120,7 @@ class DeclarationsWalker {
120120
}
121121

122122
function writeProtocolFile(outputFile: string, protocolTs: string, typeScriptServicesDts: string) {
123-
const options = { target: ts.ScriptTarget.ES5, declaration: true, noResolve: false, types: <string[]>[], stripInternal: true };
123+
const options = { target: ts.ScriptTarget.ES5, declaration: true, noResolve: false, types: [] as string[], stripInternal: true };
124124

125125
/**
126126
* 1st pass - generate a program from protocol.ts and typescriptservices.d.ts and emit core version of protocol.d.ts with all internal members stripped

0 commit comments

Comments
 (0)