diff --git a/src/shared/@types/document.ts b/src/shared/@types/document.ts index 8249f25a..462a1291 100644 --- a/src/shared/@types/document.ts +++ b/src/shared/@types/document.ts @@ -11,7 +11,7 @@ import { } from "../../3.0/types"; import { Literal, Static, String } from "runtypes"; import { ethers } from "ethers"; -import { V4Document, V4SignedWrappedDocument, V4WrappedDocument } from "src/4.0/types"; +import { V4Document, V4SignedWrappedDocument, V4WrappedDocument } from "../../4.0/types"; export type OpenAttestationDocument = OpenAttestationDocumentV2 | OpenAttestationDocumentV3 | V4Document; export type WrappedDocument = T extends OpenAttestationDocumentV2 diff --git a/tsconfig.json b/tsconfig.json index ab9b0b7b..c3cde936 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,17 +3,23 @@ "files": true }, "compilerOptions": { - "lib": ["es2019"], - "target": "es5", + "strict": true, + // affects emission "module": "commonjs", "moduleResolution": "node", - "strict": true, - "baseUrl": ".", + // affects emission + // 98% browser support (https://caniuse.com/?search=es6) + // Node >12 already supports ES2019 (https://node.green/#ES2019) + "target": "ES6", + // 96% browser support (https://caniuse.com/array-flat) + "lib": ["ES2019.Array"], "typeRoots": ["./src/@types", "./node_modules/@types"], "skipLibCheck": true, "resolveJsonModule": true, + // affects emission "esModuleInterop": true, - "allowJs": true + "allowJs": true, + "outDir": "./dist" }, "include": ["./src/**/*"] }