Make Strict Mode Strict Again (#1938)

* fix: don't format "unorthodox" query input types

Also add support for tuples in `getSimilarTypes`

* fix: refactor type ignore logic into `formatType`

Had to use a regexp solution because types like `([AccountId | string | Uint8Array, Data | { none: any } | { raw: any } | { blakeTwo256: any } | { sha256: any } | { keccak256: any } | { shaThree256: any } | string | Uint8Array])[]` were not being ignored with the current logic, so they were passed to `getTypeDef` and causing delimiter errors.

* refactor: remove superfluous "FirstKeyType" param

* fix: ignore tuples with structs when formatting

* feat: eliminate all index signatures with --strict

* docs: fix doc generation
This commit is contained in:
Jeremías Díaz
2020-02-25 08:40:07 +01:00
committed by GitHub
parent 775697f51e
commit 2d0ce2ddff
10 changed files with 40 additions and 16 deletions
@@ -10,9 +10,8 @@ export type AugmentedConst<T extends Codec> = T & ConstantCodec;
export type ModuleConstants = Record<string, Codec>;
export interface Constants {
[index: string]: ModuleConstants;
}
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface Constants {}
export interface ConstantCodec extends Codec {
meta: ModuleConstantMetadataLatest;