Skip to content

Commit cf25bab

Browse files
committed
rename
1 parent 5c8e35c commit cf25bab

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

packages/compass-collection/src/components/mock-data-generator-modal/to-simplified-field-info.spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { expect } from 'chai';
22
import toSimplifiedFieldInfo from './to-simplified-field-info';
3-
import type { UserFriendlyFieldInfoTree } from './to-simplified-field-info';
3+
import type { SimplifiedFieldInfoTree } from './to-simplified-field-info';
44

55
describe('toSimplifiedFieldInfo', function () {
66
it('simple case with minimal nesting and no arrays', function () {
@@ -39,7 +39,7 @@ describe('toSimplifiedFieldInfo', function () {
3939

4040
const result = toSimplifiedFieldInfo(input);
4141

42-
const expected: UserFriendlyFieldInfoTree = {
42+
const expected: SimplifiedFieldInfoTree = {
4343
user: {
4444
name: 'String',
4545
age: 'Number',
@@ -93,7 +93,7 @@ describe('toSimplifiedFieldInfo', function () {
9393

9494
const result = toSimplifiedFieldInfo(input);
9595

96-
const expected: UserFriendlyFieldInfoTree = {
96+
const expected: SimplifiedFieldInfoTree = {
9797
'tags[]': 'String',
9898
'scores[]': 'Number',
9999
'matrix[][]': 'Number',
@@ -141,7 +141,7 @@ describe('toSimplifiedFieldInfo', function () {
141141

142142
const result = toSimplifiedFieldInfo(input);
143143

144-
const expected: UserFriendlyFieldInfoTree = {
144+
const expected: SimplifiedFieldInfoTree = {
145145
'items[]': {
146146
id: 'Number',
147147
name: 'String',
@@ -224,7 +224,7 @@ describe('toSimplifiedFieldInfo', function () {
224224

225225
const result = toSimplifiedFieldInfo(input);
226226

227-
const expected: UserFriendlyFieldInfoTree = {
227+
const expected: SimplifiedFieldInfoTree = {
228228
'cube[][][]': 'Number',
229229
'matrix[][]': {
230230
x: 'Number',

packages/compass-collection/src/components/mock-data-generator-modal/to-simplified-field-info.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type { FieldInfo } from '../../schema-analysis-types';
44
type UserFriendlyFieldInfoNode =
55
| { [field: string]: UserFriendlyFieldInfoNode }
66
| FieldInfo['type'];
7-
export type UserFriendlyFieldInfoTree = {
7+
export type SimplifiedFieldInfoTree = {
88
[field: string]: UserFriendlyFieldInfoNode;
99
};
1010

@@ -14,13 +14,13 @@ export type UserFriendlyFieldInfoTree = {
1414
*/
1515
export default function toSimplifiedFieldInfo(
1616
input: ReturnType<typeof processSchema>
17-
): UserFriendlyFieldInfoTree {
17+
): SimplifiedFieldInfoTree {
1818
// ensure parent nodes are created before their children
1919
const sortedFieldPaths = Object.keys(input).sort(
2020
(f1, f2) => countSeparators(f1) - countSeparators(f2)
2121
);
2222

23-
const result: UserFriendlyFieldInfoTree = {};
23+
const result: SimplifiedFieldInfoTree = {};
2424
for (const path of sortedFieldPaths) {
2525
const fieldParts = path.split('.');
2626

0 commit comments

Comments
 (0)