add react/index.d.ts

This commit is contained in:
wxzhang 2023-01-10 17:08:00 +08:00
parent d84f774f67
commit b9129556e7
5 changed files with 15 additions and 10 deletions

View File

@ -7,12 +7,9 @@
"test": "cross-env NODE_OPTIONS=--experimental-vm-modules node node_modules/jest/bin/jest.js ",
"test:app": "cross-env NODE_OPTIONS=--experimental-vm-modules node node_modules/jest/bin/jest.js -- app",
"test:runtime": "cross-env NODE_OPTIONS=--experimental-vm-modules jest runtime --coverage --collectCoverageFrom packages/runtime/dist/runtime.cjs",
"publish:auto": "node --inspect -- ./node_modules/autopub/src/index.js",
"publish:mock": "node ./node_modules/flexpub/src/index.js",
"list:package": "node ./packages/autopublish/index.js list",
"autopublish": "node ./packages/autopublish/index.js -a --no-ask",
"docs:build": " dumi build",
"docs:dev": "cross-env NODE_OPTIONS=--openssl-legacy-provider dumi dev "
"docs:dev": "cross-env NODE_OPTIONS=--openssl-legacy-provider dumi dev ",
"auto-pub": "autopub"
},
"author": "",
"license": "ISC",
@ -52,6 +49,6 @@
"includeDescendants": false
},
"dependencies": {
"autopub": "link:.yalc/autopub"
"autopub": "link:.yalc\\autopub"
}
}

7
packages/react/index.d.ts vendored Normal file
View File

@ -0,0 +1,7 @@
export var useVoerkaI18n:()=>{
activeLanguage:string
changeLanguage:(newLanguage:string)=>Promise<void>
languages:VoerkaI18nSupportedLanguages
}

View File

@ -3,6 +3,7 @@
"version": "1.0.4",
"description": "React支持,提供语言切换等功能",
"main": "index.js",
"typings": "index.d.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"release": "pnpm autopublish"

0
packages/vue/index.d.ts vendored Normal file
View File

8
pnpm-lock.yaml generated
View File

@ -10,7 +10,7 @@ importers:
'@rollup/plugin-babel': ^5.3.1
'@rollup/plugin-commonjs': ^21.0.2
'@vuepress/client': ^2.0.0-beta.49
autopub: link:.yalc/autopub
autopub: link:.yalc\autopub
commander: ^9.0.0
cross-env: ^7.0.3
dayjs: ^1.11.0
@ -5779,7 +5779,7 @@ packages:
requiresBuild: true
dependencies:
bindings: 1.5.0
nan: 2.16.0
nan: 2.17.0
optional: true
/fsevents/2.3.2:
@ -8315,8 +8315,8 @@ packages:
resolution: {integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==}
dev: true
/nan/2.16.0:
resolution: {integrity: sha512-UdAqHyFngu7TfQKsCBgAA6pWDkT8MAO7d0jyOecVhN5354xbLqdn8mV9Tat9gepAupm0bt2DbeaSC8vS52MuFA==}
/nan/2.17.0:
resolution: {integrity: sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==}
requiresBuild: true
optional: true