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