Skip to content

perf👌: 针对 examples,升级依赖 typescript 版本为 4.4.4,同时解决 ts 报错问题 #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/simple-BI/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"private": true,
"type": "./src/index.d.ts",
"dependencies": {
"redux-with-domain": "^1.0.0",
"@antv/g2plot": "^1.0.2",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2",
Expand All @@ -26,8 +25,9 @@
"react-scripts": "3.4.0",
"redux": "^4.0.0",
"redux-saga": "^0.16.0",
"redux-with-domain": "^1.0.0",
"reselect": "^3.0.0",
"typescript": "~3.7.2"
"typescript": "4.4.4"
},
"scripts": {
"start": "react-scripts start",
Expand Down
2 changes: 1 addition & 1 deletion examples/simple-BI/src/domain/dataset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default createDomainModule<Entities, {}, Effects>('domain/dataset', {
services: ({ entities, sagaEffects: { put, call } }) => ({
*fetchDatasets({ payload }: { payload: string[] }) {
// 请求图表详情
const datasets = yield call(quertyDatasetList, payload)
const datasets:DatasetItem = yield call(quertyDatasetList, payload)
// 保存值
entities.datasetList.insert(datasets)
}
Expand Down
2 changes: 1 addition & 1 deletion examples/simple-BI/src/domain/report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default createDomainModule<Entities, {}, Effects>('domain/report', {
services: ({ services, entities, sagaEffects: { put, call } }) => ({
*fetchReports({ payload }: { payload: string[] }) {
// 请求报表列表
const reports = yield call(quertyReportList, payload)
const reports:ReportItem = yield call(quertyReportList, payload)
// 保存值
entities.reportList.insert(reports)
}
Expand Down
9 changes: 6 additions & 3 deletions examples/simple-BI/src/service/loadWorkbook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,21 @@ import { quertyReportList } from '../api/report'
import workbookDomain from '../domain/workbook'
import datasetDomain from '../domain/dataset'
import reportDomain from '../domain/report'
import { Workbook } from '../domain/workbook'
import { DatasetItem } from '../domain/dataset'
import { ReportItem } from '../domain/report'

export default function* loadWorkbook(id: string) {
// 查询工作簿
const workbook = yield effects.call(queryWorkbook, id)
const workbook:Workbook = yield effects.call(queryWorkbook, id)
workbookDomain.entities.workbookList.insert(workbook)
// 查询引用的数据集
const datasetList = yield effects.call(
const datasetList:DatasetItem = yield effects.call(
quertyDatasetList,
workbook.datasetIdList
)
datasetDomain.entities.datasetList.insert(datasetList)
// 查询管理的报表
const reportList = yield effects.call(quertyReportList, workbook.reportIdList)
const reportList:ReportItem = yield effects.call(quertyReportList, workbook.reportIdList)
reportDomain.entities.reportList.insert(reportList)
}