Update TypeScript

This commit is contained in:
Zaid Abdulla committed 2021-09-16 00:17:21 -07:00
1 parent f4692faed6
commit 0861b2db40
9 files changed
+38 -38

No files matched your search

+4 -4
View File
@@ -21,13 +21,13 @@ import { PermissionSet, Expression } from "../types";
import { evaluate, or } from "./expression";
export default class Authorizer {
private permissionSets: PermissionSet[];
private validatorCache: WeakMap<
private declare permissionSets: PermissionSet[];
private declare validatorCache: WeakMap<
any,
(mutationType, mutation, any) => boolean
>;
private hasAccessCache: Map<string, boolean>;
private getFilterCache: Map<string, Expression>;
private declare hasAccessCache: Map<string, boolean>;
private declare getFilterCache: Map<string, Expression>;
public constructor(permissionSets: PermissionSet[]) {
this.permissionSets = permissionSets;
+10 -10
View File
@@ -29,8 +29,8 @@ const TWO = BI.BigInt(2);
const NEGATIVE_ONE = BI.BigInt(-1);
class Indeterminates {
public map: Map<string, number>;
public sortedKeys: string[];
public declare map: Map<string, number>;
public declare sortedKeys: string[];
public constructor(str?: string) {
this.map = new Map();
@@ -118,7 +118,7 @@ function findGcd(a: BI.bigint, b: BI.bigint): BI.bigint {
}
class Polynomial {
public terms: Term[];
public declare terms: Term[];
public constructor(terms: Term[]) {
this.terms = terms;
@@ -343,8 +343,8 @@ class NullSynth extends BoolExprSynth {
}
class VarSynth extends BoolExprSynth {
private expStr: string;
private negate: boolean;
private declare expStr: string;
private declare negate: boolean;
public constructor(exp: Expression) {
super();
this.negate = false;
@@ -388,7 +388,7 @@ class VarSynth extends BoolExprSynth {
}
class NotSynth extends BoolExprSynth {
private exprSynth: BoolExprSynth;
private declare exprSynth: BoolExprSynth;
public constructor(e: BoolExprSynth) {
super();
this.exprSynth = e;
@@ -405,7 +405,7 @@ class NotSynth extends BoolExprSynth {
}
class IsNullSynth extends BoolExprSynth {
private exprSynth: BoolExprSynth;
private declare exprSynth: BoolExprSynth;
public constructor(e: BoolExprSynth) {
super();
this.exprSynth = e;
@@ -422,7 +422,7 @@ class IsNullSynth extends BoolExprSynth {
}
class OrSynth extends BoolExprSynth {
private exprSynths: BoolExprSynth[];
private declare exprSynths: BoolExprSynth[];
public constructor(...e: BoolExprSynth[]) {
super();
this.exprSynths = e.filter((ee) => !(ee instanceof FalseSynth));
@@ -465,7 +465,7 @@ class OrSynth extends BoolExprSynth {
}
class AndSynth extends BoolExprSynth {
private exprSynths: BoolExprSynth[];
private declare exprSynths: BoolExprSynth[];
public constructor(...e: BoolExprSynth[]) {
super();
this.exprSynths = e.filter((ee) => !(ee instanceof TrueSynth));
@@ -508,7 +508,7 @@ class AndSynth extends BoolExprSynth {
}
class CaseSynth extends BoolExprSynth {
private exprSynths: BoolExprSynth[];
private declare exprSynths: BoolExprSynth[];
public constructor(e: BoolExprSynth[]) {
super();
this.exprSynths = e;
+3 -3
View File
@@ -20,9 +20,9 @@
import Path from "./path";
export default class PathSet {
private lengthIndex: Set<Path>[];
private fragmentIndex: Map<string, Set<Path>>[];
private stringIndex: Map<string, Path>;
private declare lengthIndex: Set<Path>[];
private declare fragmentIndex: Map<string, Set<Path>>[];
private declare stringIndex: Map<string, Path>;
public constructor() {
this.lengthIndex = [];
+5 -5
View File
@@ -49,11 +49,11 @@ function legalChar(c: number): boolean {
}
export default class Path {
public readonly segments: Segments;
public readonly wildcard: number;
public readonly alias: number;
protected _string: string;
protected _stringIndex: number[];
public declare readonly segments: Segments;
public declare readonly wildcard: number;
public declare readonly alias: number;
protected declare _string: string;
protected declare _stringIndex: number[];
protected static parseAliasValue(
pattern: string,
+1 -1
View File
@@ -22,7 +22,7 @@ interface Instance {
}
export default class InstanceSet {
private set: Set<Instance>;
private declare set: Set<Instance>;
public constructor() {
this.set = new Set();
+4 -4
View File
@@ -26,10 +26,10 @@ interface Revisions<V> {
}
export default class VersionedMap<K, V> {
private _sizeDiff: number[];
private _revision: number;
private map: Map<K, (V | symbol)[]>;
public dirty: number;
private declare _sizeDiff: number[];
private declare _revision: number;
private declare map: Map<K, (V | symbol)[]>;
public declare dirty: number;
public constructor() {
this._sizeDiff = [0];
+3 -3
View File
@@ -11118,9 +11118,9 @@
}
},
"typescript": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.3.tgz",
"integrity": "sha512-qOcYwxaByStAWrBf4x0fibwZvMRG+r4cQoTjbPtUlrWjBHbmCAww1i448U0GJ+3cNNEtebDteo/cHOR3xJ4wEw==",
"version": "4.3.5",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz",
"integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==",
"dev": true
},
"unbox-primitive": {
+1 -1
View File
@@ -66,7 +66,7 @@
"rollup-plugin-terser": "^7.0.2",
"svgo": "^2.2.2",
"ts-node": "^9.1.1",
"typescript": "^4.2.3",
"typescript": "^4.3.5",
"yaml": "^1.10.0"
},
"engines": {
+7 -7
View File
@@ -23,13 +23,13 @@ type AutocompleteCallback = (
) => void;
export default class Autocomplete {
private callback: AutocompleteCallback;
private element: HTMLInputElement;
private hideTimeout: NodeJS.Timeout;
private visible: boolean;
private default: string;
private selection: number;
private container: HTMLElement;
private declare callback: AutocompleteCallback;
private declare element: HTMLInputElement;
private declare hideTimeout: NodeJS.Timeout;
private declare visible: boolean;
private declare default: string;
private declare selection: number;
private declare container: HTMLElement;
public constructor(className: string, callback: AutocompleteCallback) {
this.callback = callback;