diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 0000000..5d6d487 --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,35 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs + +name: Node.js CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18.x, 20.x, 22.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + defaults: + run: + working-directory: funding-splits/distribution + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + cache-dependency-path: funding-splits/distribution/package-lock.json + - run: npm ci + - run: npx tsc diff --git a/DRIP_LIST_FUNDING_SPLITS.md b/DRIP_LIST_FUNDING_SPLITS.md index 8397352..4ce7b7b 100644 --- a/DRIP_LIST_FUNDING_SPLITS.md +++ b/DRIP_LIST_FUNDING_SPLITS.md @@ -118,8 +118,8 @@ distribution.elimu.eth,tgl.distribution.elimu.eth,10 | [start-guide](https://github.com/elimu-ai/start-guide) | `distribution.elimu.eth` | | | [website](https://github.com/elimu-ai/website) | `distribution.elimu.eth` | [`FUNDING_SPLITS.csv`](https://github.com/elimu-ai/website/blob/main/FUNDING_SPLITS.csv) | | [web3-sponsors](https://github.com/elimu-ai/web3-sponsors) | `distribution.elimu.eth` | | -| Hindi Language 🏏🐯 | `hin.distribution.elimu.eth` | | -| Tagalog Language 🏝️🦎 | `tgl.distribution.elimu.eth` | | +| Hindi Language 🏏🐯 | `hin.distribution.elimu.eth` | [`FUNDING_SPLITS_HIN.csv`](./funding-splits/distribution/FUNDING_SPLITS_HIN.csv) | +| Tagalog Language 🏝️🦎 | `tgl.distribution.elimu.eth` | [`FUNDING_SPLITS_TGL.csv`](./funding-splits/distribution/FUNDING_SPLITS_TGL.csv) | --- diff --git a/funding-splits/distribution/.gitignore b/funding-splits/distribution/.gitignore new file mode 100644 index 0000000..a3413de --- /dev/null +++ b/funding-splits/distribution/.gitignore @@ -0,0 +1,2 @@ +node_modules +query-sponsorship-events.js diff --git a/funding-splits/distribution/FUNDING_SPLITS_HIN.csv b/funding-splits/distribution/FUNDING_SPLITS_HIN.csv index 08354d2..393545f 100644 --- a/funding-splits/distribution/FUNDING_SPLITS_HIN.csv +++ b/funding-splits/distribution/FUNDING_SPLITS_HIN.csv @@ -1 +1,7 @@ ethereum_address,sponsorship_count,distribution_count,impact_percentage +0xA7D1CB88740642DC95774511Cc73f015396Be869,4,0,44.44444444444444 +0x883753Beab357A2c29f3766C6ad158e72A78ce51,1,0,11.11111111111111 +0xFf7e232A44C74b306623f0d20dd6995775773842,1,0,11.11111111111111 +0xEbcF2690AF9e7D17e7dfB7118f65321Fc68d4b97,1,0,11.11111111111111 +0x29d6744eF3C98a00CAE8071D6DC292c53d6c5C75,1,0,11.11111111111111 +0x015B5dF1673499E32D11Cf786A43D1c42b3d725C,1,0,11.11111111111111 diff --git a/funding-splits/distribution/README.md b/funding-splits/distribution/README.md new file mode 100644 index 0000000..de07075 --- /dev/null +++ b/funding-splits/distribution/README.md @@ -0,0 +1,23 @@ +# distribution + +> Drip List funding splits for Distribution & Data Collection πŸ›΅πŸ’¨ + +See [`../../DRIP_LIST_FUNDING_SPLITS.md#distribution`](../../DRIP_LIST_FUNDING_SPLITS.md#distribution) + +## Install Dependencies + +```bash +npm install +``` + +## Run the TypeScript Compiler + +```bash +npx tsc +``` + +## Run the JavaScript + +```bash +node ./query-sponsorship-events.js +``` diff --git a/funding-splits/distribution/abis/SponsorshipQueue.json b/funding-splits/distribution/abis/SponsorshipQueue.json new file mode 100644 index 0000000..1ea90cc --- /dev/null +++ b/funding-splits/distribution/abis/SponsorshipQueue.json @@ -0,0 +1,177 @@ +{ + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "_estimatedCost", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "OnlyOwner", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "estimatedCost", + "type": "uint256" + } + ], + "name": "EstimatedCostUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnerUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "estimatedCost", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + }, + { + "internalType": "address", + "name": "sponsor", + "type": "address" + } + ], + "indexed": false, + "internalType": "struct Sponsorship", + "name": "sponsorship", + "type": "tuple" + } + ], + "name": "SponsorshipAdded", + "type": "event" + }, + { + "inputs": [], + "name": "addSponsorship", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "estimatedCost", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getQueueCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "queue", + "outputs": [ + { + "internalType": "uint256", + "name": "estimatedCost", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + }, + { + "internalType": "address", + "name": "sponsor", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_estimatedCost", + "type": "uint256" + } + ], + "name": "updateEstimatedCost", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_owner", + "type": "address" + } + ], + "name": "updateOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/funding-splits/distribution/package-lock.json b/funding-splits/distribution/package-lock.json new file mode 100644 index 0000000..4573045 --- /dev/null +++ b/funding-splits/distribution/package-lock.json @@ -0,0 +1,135 @@ +{ + "name": "distribution", + "version": "0.0.1", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "distribution", + "version": "0.0.1", + "license": "MIT", + "dependencies": { + "csv-writer": "^1.6.0" + }, + "devDependencies": { + "ethers": "^6.13.2", + "typescript": "^5.5.4" + } + }, + "node_modules/@adraffy/ens-normalize": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/@adraffy/ens-normalize/-/ens-normalize-1.10.1.tgz", + "integrity": "sha512-96Z2IP3mYmF1Xg2cDm8f1gWGf/HUVedQ3FMifV4kG/PQ4yEP51xDtRAEfhVNt5f/uzpNkZHwWQuUcu6D6K+Ekw==", + "dev": true + }, + "node_modules/@noble/curves": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz", + "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==", + "dev": true, + "dependencies": { + "@noble/hashes": "1.3.2" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/hashes": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", + "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==", + "dev": true, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@types/node": { + "version": "18.15.13", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.13.tgz", + "integrity": "sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==", + "dev": true + }, + "node_modules/aes-js": { + "version": "4.0.0-beta.5", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-4.0.0-beta.5.tgz", + "integrity": "sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==", + "dev": true + }, + "node_modules/csv-writer": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/csv-writer/-/csv-writer-1.6.0.tgz", + "integrity": "sha512-NOx7YDFWEsM/fTRAJjRpPp8t+MKRVvniAg9wQlUKx20MFrPs73WLJhFf5iteqrxNYnsy924K3Iroh3yNHeYd2g==" + }, + "node_modules/ethers": { + "version": "6.13.2", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.13.2.tgz", + "integrity": "sha512-9VkriTTed+/27BGuY1s0hf441kqwHJ1wtN2edksEtiRvXx+soxRX3iSXTfFqq2+YwrOqbDoTHjIhQnjJRlzKmg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/ethers-io/" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@adraffy/ens-normalize": "1.10.1", + "@noble/curves": "1.2.0", + "@noble/hashes": "1.3.2", + "@types/node": "18.15.13", + "aes-js": "4.0.0-beta.5", + "tslib": "2.4.0", + "ws": "8.17.1" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", + "dev": true + }, + "node_modules/typescript": { + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", + "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/ws": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", + "dev": true, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + } + } +} diff --git a/funding-splits/distribution/package.json b/funding-splits/distribution/package.json new file mode 100644 index 0000000..2f68159 --- /dev/null +++ b/funding-splits/distribution/package.json @@ -0,0 +1,18 @@ +{ + "name": "distribution", + "version": "0.0.1", + "description": "Drip List funding splits for Distribution & Data Collection πŸ›΅πŸ’¨", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "Ξlimu DAO", + "license": "MIT", + "devDependencies": { + "ethers": "^6.13.2", + "typescript": "^5.5.4" + }, + "dependencies": { + "csv-writer": "^1.6.0" + } +} diff --git a/funding-splits/distribution/query-sponsorship-events.ts b/funding-splits/distribution/query-sponsorship-events.ts new file mode 100644 index 0000000..7dac274 --- /dev/null +++ b/funding-splits/distribution/query-sponsorship-events.ts @@ -0,0 +1,167 @@ +import { Contract, ethers, EventLog, JsonRpcProvider, Log, Result } from 'ethers' +import SponsorshipQueue from './abis/SponsorshipQueue.json' +import { createObjectCsvWriter as createCsvWriter } from 'csv-writer' + +const rpcServerAddress: string = 'https://base-sepolia.blockpi.network/v1/rpc/public' +console.log('rpcServerAddress:', rpcServerAddress) + +const provider: JsonRpcProvider = new ethers.JsonRpcProvider(rpcServerAddress) +// console.log('provider:', provider) + +const sponsorshipQueueContract: Contract = new ethers.Contract( + '0x9Af2E73663968fdfb9791b7D6Bd40cd259f0388a', + SponsorshipQueue.abi, + provider +) +// console.log('sponsorshipQueueContract:', sponsorshipQueueContract) + +query() + +async function query() { + console.log('query') + + const events = await sponsorshipQueueContract.queryFilter('*') + console.log('events.length:', events.length) + + const eventData: any[] = [] + + events.forEach((eventLog: any) => { + console.log('') + // console.log('eventLog:', eventLog) + + const blockNumber: number = eventLog.blockNumber + console.log('blockNumber:', eventLog.blockNumber) + + const eventName: string = eventLog.fragment.name + console.log('eventName:', eventName) + + const argResult: Result = eventLog.args + // console.log('argResult:', argResult) + // + // Sample: + // + // Result(1) [ + // Result(3) [ + // 2000000000000000n, + // 1721578316n, + // '0x015B5dF1673499E32D11Cf786A43D1c42b3d725C' + // ] + // ] + + if (eventName == 'SponsorshipAdded') { + const argResultArray: Result = argResult[0] + // console.log('argResultArray:', argResultArray) + + const estimatedCost: number = argResultArray[0] + console.log('estimatedCost:', estimatedCost) + + const timestamp: number = argResultArray[1] + console.log('timestamp:', timestamp) + + const sponsorAddress: string = argResultArray[2] + console.log('sponsorAddress:', sponsorAddress) + + eventData.push([estimatedCost, timestamp, sponsorAddress]) + } + }) + + prepareCsvData(eventData) +} + +async function prepareCsvData(eventData: any[]) { + console.log('prepareCsvData') + + console.log('eventData.length:', eventData.length) + + // Count events per sponsor address + const csvData: any[] = [] + // Sample: + // + // [ + // { + // ethereum_address: '0x015B5dF1673499E32D11Cf786A43D1c42b3d725C' + // sponsorship_count: 1 + // distribution_count: 0 + // impact_percentage: 100 + // } + // ] + eventData.forEach(sponsorshipEvent => { + const estimatedCost: number = sponsorshipEvent[0] + const timestamp: number = sponsorshipEvent[1] + const sponsorAddress: string = sponsorshipEvent[2] + + // Check if data already exists for the sponsor address + let existingData: any = undefined + csvData.forEach(data => { + // console.log('data:', data) + if (sponsorAddress == data.ethereum_address) { + existingData = data + } + }) + + if (!existingData) { + console.log('Add data for address:', sponsorAddress) + + const newData = { + ethereum_address: sponsorAddress, + sponsorship_count: 1, + distribution_count: 0 + } + csvData.push(newData) + } else { + console.log('Update data for address:', sponsorAddress) + + existingData.sponsorship_count++ + } + }) + console.log('csvData:', csvData) + + calculateImpactPercentages(csvData) + + exportToCsv(csvData) +} + +function calculateImpactPercentages(csvData: any[]) { + console.log('calculateImpactPercentages') + + let sponsorshipCountTotal: number = 0 + let distributionCountTotal: number = 0 + csvData.forEach(csvDataRow => { + sponsorshipCountTotal += csvDataRow.sponsorship_count + distributionCountTotal += csvDataRow.distribution_count + }) + console.log('sponsorshipCountTotal:', sponsorshipCountTotal) + console.log('distributionCountTotal:', distributionCountTotal) + + // Calculate the impact percentage for each sponsor address + csvData.forEach(csvDataRow => { + const impactPercentage: number = 100 + * (csvDataRow.sponsorship_count + csvDataRow.distribution_count) + / (sponsorshipCountTotal + distributionCountTotal) + // console.log('impactPercentage:', impactPercentage) + csvDataRow.impact_percentage = impactPercentage + }) + console.log('csvData:', csvData) +} + +function exportToCsv(csvData: any[]) { + console.log('exportToCsv') + + const outputPath: string = 'FUNDING_SPLITS_HIN.csv' + console.log('outputPath:', outputPath) + const csvWriter = createCsvWriter({ + path: outputPath, + header: [ + {id: 'ethereum_address', title: 'ethereum_address'}, + {id: 'sponsorship_count', title: 'sponsorship_count'}, + {id: 'distribution_count', title: 'distribution_count'}, + {id: 'impact_percentage', title: 'impact_percentage'} + ] + }) + + csvWriter + .writeRecords(csvData) + .then(() => { + console.log('The CSV file was written successfully:', outputPath) + }) +} diff --git a/funding-splits/distribution/tsconfig.json b/funding-splits/distribution/tsconfig.json new file mode 100644 index 0000000..958e7cd --- /dev/null +++ b/funding-splits/distribution/tsconfig.json @@ -0,0 +1,108 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + + /* Projects */ + // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + + /* Language and Environment */ + "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "jsx": "preserve", /* Specify what JSX code is generated. */ + // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ + // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ + // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + + /* Modules */ + "module": "commonjs", /* Specify what module code is generated. */ + // "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ + // "types": [], /* Specify type package names to be included without being referenced in a source file. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ + // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ + // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ + // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ + // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ + "resolveJsonModule": true, /* Enable importing .json files. */ + // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ + // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ + + /* JavaScript Support */ + // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + + /* Emit */ + // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ + // "outDir": "./", /* Specify an output folder for all emitted files. */ + // "removeComments": true, /* Disable emitting comments. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ + // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ + // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + + /* Interop Constraints */ + // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ + // "isolatedDeclarations": true, /* Require sufficient annotation on exports so other tools can trivially generate declaration files. */ + // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + + /* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ + // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ + // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ + // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ + // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ + // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ + // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ + // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ + // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ + // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ + // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ + + /* Completeness */ + // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + "skipLibCheck": true /* Skip type checking all .d.ts files. */ + } +}