fix: fix flow type declaration (#17049)
* fix: fix flow type declaration * chore: fix prettier
This commit is contained in:
11
web3.js/.flowconfig
Normal file
11
web3.js/.flowconfig
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[ignore]
|
||||||
|
|
||||||
|
[include]
|
||||||
|
|
||||||
|
[libs]
|
||||||
|
|
||||||
|
[lints]
|
||||||
|
|
||||||
|
[options]
|
||||||
|
|
||||||
|
[strict]
|
22203
web3.js/package-lock.json
generated
22203
web3.js/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -37,19 +37,18 @@
|
|||||||
"/src"
|
"/src"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "npm run clean; cross-env NODE_ENV=production rollup -c; npm run generate:dts; npm run generate:flow",
|
"build": "npm run clean; cross-env NODE_ENV=production rollup -c; npm run type:gen; npm run flow:gen; npm run flow:check",
|
||||||
"build:browser-test": "rollup -c test/rollup.config.js",
|
"build:browser-test": "rollup -c test/rollup.config.js",
|
||||||
"build:fixtures": "set -ex; ./test/fixtures/noop-program/build.sh",
|
"build:fixtures": "set -ex; ./test/fixtures/noop-program/build.sh",
|
||||||
"clean": "rimraf ./coverage ./lib",
|
"clean": "rimraf ./coverage ./lib",
|
||||||
"codecov": "set -ex; npm run test:cover; cat ./coverage/lcov.info | codecov",
|
"codecov": "set -ex; npm run test:cover; cat ./coverage/lcov.info | codecov",
|
||||||
"dev": "cross-env NODE_ENV=development rollup -c",
|
"dev": "cross-env NODE_ENV=development rollup -c",
|
||||||
"doc": "set -ex; typedoc",
|
"doc": "set -ex; typedoc",
|
||||||
"doc:watch": "watch 'npm run doc' . --wait=1 --ignoreDirectoryPattern=/doc/",
|
"flow:check": "flow check-contents < module.flow.js",
|
||||||
"generate:dts": "./scripts/typegen.sh",
|
"flow:gen": "flowgen lib/index.d.ts -o module.flow.js",
|
||||||
"generate:flow": "flowgen lib/index.d.ts -o module.flow.js",
|
"type:gen": "./scripts/typegen.sh",
|
||||||
"lint": "set -ex; npm run pretty; eslint . --ext .js,.ts",
|
"lint": "set -ex; npm run pretty; eslint . --ext .js,.ts",
|
||||||
"lint:fix": "npm run pretty:fix && eslint . --fix",
|
"lint:fix": "npm run pretty:fix && eslint . --fix",
|
||||||
"lint:watch": "watch 'npm run lint:fix' . --wait=1 --ignoreDirectoryPattern=/doc/",
|
|
||||||
"ok": "run-s lint test doc",
|
"ok": "run-s lint test doc",
|
||||||
"pretty": "prettier --check '{,{src,test}/**/}*.{j,t}s'",
|
"pretty": "prettier --check '{,{src,test}/**/}*.{j,t}s'",
|
||||||
"pretty:fix": "prettier --write '{,{src,test}/**/}*.{j,t}s'",
|
"pretty:fix": "prettier --write '{,{src,test}/**/}*.{j,t}s'",
|
||||||
@ -116,6 +115,7 @@
|
|||||||
"eslint-plugin-mocha": "^8.0.0",
|
"eslint-plugin-mocha": "^8.0.0",
|
||||||
"eslint-plugin-prettier": "^3.0.0",
|
"eslint-plugin-prettier": "^3.0.0",
|
||||||
"esm": "^3.2.25",
|
"esm": "^3.2.25",
|
||||||
|
"flow-bin": "^0.150.0",
|
||||||
"flowgen": "^1.13.0",
|
"flowgen": "^1.13.0",
|
||||||
"http-server": "^0.12.3",
|
"http-server": "^0.12.3",
|
||||||
"mocha": "^8.2.1",
|
"mocha": "^8.2.1",
|
||||||
@ -136,7 +136,6 @@
|
|||||||
"ts-node": "^9.1.1",
|
"ts-node": "^9.1.1",
|
||||||
"tslib": "^2.1.0",
|
"tslib": "^2.1.0",
|
||||||
"typedoc": "^0.20.31",
|
"typedoc": "^0.20.31",
|
||||||
"typescript": "^4.1.5",
|
"typescript": "^4.1.5"
|
||||||
"watch": "^1.0.2"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,8 +30,11 @@ function generateConfig(configType, format) {
|
|||||||
plugins: bundle ? [] : ['@babel/plugin-transform-runtime'],
|
plugins: bundle ? [] : ['@babel/plugin-transform-runtime'],
|
||||||
}),
|
}),
|
||||||
replace({
|
replace({
|
||||||
'process.env.NODE_ENV': JSON.stringify(env),
|
preventAssignment: true,
|
||||||
'process.env.BROWSER': JSON.stringify(browser),
|
values: {
|
||||||
|
'process.env.NODE_ENV': JSON.stringify(env),
|
||||||
|
'process.env.BROWSER': JSON.stringify(browser),
|
||||||
|
},
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
onwarn: function (warning, rollupWarn) {
|
onwarn: function (warning, rollupWarn) {
|
||||||
|
@ -1594,10 +1594,12 @@ export type GetProgramAccountsConfig = {
|
|||||||
/**
|
/**
|
||||||
* Configuration object for getParsedProgramAccounts
|
* Configuration object for getParsedProgramAccounts
|
||||||
*/
|
*/
|
||||||
export type GetParsedProgramAccountsConfig = Exclude<
|
export type GetParsedProgramAccountsConfig = {
|
||||||
GetProgramAccountsConfig,
|
/** Optional commitment level */
|
||||||
'encoding' | 'dataSlice'
|
commitment?: Commitment;
|
||||||
>;
|
/** Optional array of filters to apply to accounts */
|
||||||
|
filters?: GetProgramAccountsFilter[];
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Information describing an account
|
* Information describing an account
|
||||||
|
Reference in New Issue
Block a user