type: type enhance (#39140)

This commit is contained in:
lijianan 2022-12-01 12:22:11 +08:00 committed by GitHub
parent ada192f3a0
commit 65af95093b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,7 @@ const generateData = (_level: number, _preKey?: React.Key, _tns?: DataNode[]) =>
const preKey = _preKey || '0';
const tns = _tns || defaultData;
const children = [];
const children: React.Key[] = [];
for (let i = 0; i < x; i++) {
const key = `${preKey}-${i}`;
tns.push({ title: key, key });

View File

@ -13,7 +13,7 @@ const generateData = (_level: number, _preKey?: React.Key, _tns?: DataNode[]) =>
const preKey = _preKey || '0';
const tns = _tns || defaultData;
const children = [];
const children: React.Key[] = [];
for (let i = 0; i < x; i++) {
const key = `${preKey}-${i}`;
tns.push({ title: key, key });