Skip to content

Commit 6eddd77

Browse files
committed
Rename.
1 parent 9bf1810 commit 6eddd77

File tree

10 files changed

+48
-48
lines changed

10 files changed

+48
-48
lines changed

packages/dds/tree/api-report/tree.alpha.api.md

Lines changed: 8 additions & 8 deletions
Large diffs are not rendered by default.

packages/dds/tree/src/simple-tree/api/schemaFromSimple.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
type FieldProps,
1414
} from "../fieldSchema.js";
1515
import type {
16-
SimpleAllowedTypes,
16+
SimpleAllowedTypesAttributes,
1717
SimpleFieldSchema,
1818
SimpleNodeSchema,
1919
SimpleTreeSchema,
@@ -86,7 +86,7 @@ function generateFieldSchema(
8686
}
8787

8888
function generateAllowedTypes(
89-
allowed: ReadonlyMap<string, SimpleAllowedTypes>,
89+
allowed: ReadonlyMap<string, SimpleAllowedTypesAttributes>,
9090
context: Context,
9191
): AllowedTypes {
9292
return Array.from(

packages/dds/tree/src/simple-tree/core/allowedTypes.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import {
2525
type TreeNodeSchema,
2626
} from "./treeNodeSchema.js";
2727
import { schemaAsTreeNodeValid } from "./treeNodeValid.js";
28-
import type { SimpleAllowedTypes } from "../simpleSchema.js";
28+
import type { SimpleAllowedTypesAttributes } from "../simpleSchema.js";
2929

3030
/**
3131
* Schema for types allowed in some location in a tree (like a field, map entry or array).
@@ -254,12 +254,12 @@ export class AnnotatedAllowedTypesInternal<
254254
}
255255

256256
/**
257-
* Get the {@link SimpleAllowedTypes} version of the allowed types set.
257+
* Get the {@link SimpleAllowedTypesAttributes} version of the allowed types set.
258258
*/
259259
public static evaluateSimpleAllowedTypes(
260260
annotatedAllowedTypes: AnnotatedAllowedTypes,
261-
): ReadonlyMap<string, SimpleAllowedTypes> {
262-
const simpleAllowedTypes = new Map<string, SimpleAllowedTypes>();
261+
): ReadonlyMap<string, SimpleAllowedTypesAttributes> {
262+
const simpleAllowedTypes = new Map<string, SimpleAllowedTypesAttributes>();
263263
for (const type of annotatedAllowedTypes.evaluate().types) {
264264
simpleAllowedTypes.set(type.type.identifier, {
265265
isStaged: type.metadata.stagedSchemaUpgrade !== undefined,

packages/dds/tree/src/simple-tree/fieldSchema.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import type {
3131
} from "./core/index.js";
3232
import { normalizeAllowedTypes } from "./core/index.js";
3333

34-
import type { SimpleAllowedTypes, SimpleFieldSchema } from "./simpleSchema.js";
34+
import type { SimpleAllowedTypesAttributes, SimpleFieldSchema } from "./simpleSchema.js";
3535
import type { UnsafeUnknownSchema } from "./unsafeUnknownSchema.js";
3636
import type { InsertableContent } from "./unhydratedFlexTreeFromInsertable.js";
3737

@@ -412,9 +412,9 @@ export class FieldSchemaAlpha<
412412
return this.allowedTypesFull.evaluateIdentifiers();
413413
}
414414

415-
public get simpleAllowedTypes(): ReadonlyMap<string, SimpleAllowedTypes> {
415+
public get simpleAllowedTypes(): ReadonlyMap<string, SimpleAllowedTypesAttributes> {
416416
const types = this.allowedTypesFull.evaluate().types;
417-
const info = new Map<string, SimpleAllowedTypes>();
417+
const info = new Map<string, SimpleAllowedTypesAttributes>();
418418

419419
for (const type of types) {
420420
info.set(type.type.identifier, {

packages/dds/tree/src/simple-tree/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ export type {
198198
SimpleNodeSchemaBaseAlpha,
199199
SimpleObjectFieldSchema,
200200
SimpleRecordNodeSchema,
201-
SimpleAllowedTypes,
201+
SimpleAllowedTypesAttributes as SimpleAllowedTypes,
202202
} from "./simpleSchema.js";
203203
export {
204204
type ImplicitFieldSchema,

packages/dds/tree/src/simple-tree/node-kinds/array/arrayNode.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ import type {
6969
import { brand, type JsonCompatibleReadOnlyObject } from "../../../util/index.js";
7070
import { nullSchema } from "../../leafNodeSchema.js";
7171
import { arrayNodeStoredSchema } from "../../toStoredSchema.js";
72-
import type { SimpleAllowedTypes } from "../../simpleSchema.js";
72+
import type { SimpleAllowedTypesAttributes } from "../../simpleSchema.js";
7373

7474
/**
7575
* A covariant base type for {@link (TreeArrayNode:interface)}.
@@ -1211,7 +1211,7 @@ export function arraySchema<
12111211
return lazyAllowedTypesIdentifiers.value;
12121212
}
12131213

1214-
public static get simpleAllowedTypes(): ReadonlyMap<string, SimpleAllowedTypes> {
1214+
public static get simpleAllowedTypes(): ReadonlyMap<string, SimpleAllowedTypesAttributes> {
12151215
return lazySimpleAllowedTypes.value;
12161216
}
12171217

packages/dds/tree/src/simple-tree/node-kinds/map/mapNode.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ import type {
6767
import { recordLikeDataToFlexContent } from "../common.js";
6868
import { MapNodeStoredSchema } from "../../../core/index.js";
6969
import type { NodeSchemaOptionsAlpha } from "../../api/index.js";
70-
import type { SimpleAllowedTypes } from "../../simpleSchema.js";
70+
import type { SimpleAllowedTypesAttributes } from "../../simpleSchema.js";
7171

7272
/**
7373
* A map of string keys to tree objects.
@@ -308,7 +308,7 @@ export function mapSchema<
308308
return lazyAllowedTypesIdentifiers.value;
309309
}
310310

311-
public static get simpleAllowedTypes(): ReadonlyMap<string, SimpleAllowedTypes> {
311+
public static get simpleAllowedTypes(): ReadonlyMap<string, SimpleAllowedTypesAttributes> {
312312
return lazySimpleAllowedTypes.value;
313313
}
314314

packages/dds/tree/src/simple-tree/node-kinds/record/recordNode.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ import { prepareForInsertion } from "../../prepareForInsertion.js";
5959
import { recordLikeDataToFlexContent } from "../common.js";
6060
import { MapNodeStoredSchema } from "../../../core/index.js";
6161
import type { NodeSchemaOptionsAlpha } from "../../api/index.js";
62-
import type { SimpleAllowedTypes } from "../../simpleSchema.js";
62+
import type { SimpleAllowedTypesAttributes } from "../../simpleSchema.js";
6363

6464
/**
6565
* Create a proxy which implements the {@link TreeRecordNode} API.
@@ -352,7 +352,7 @@ export function recordSchema<
352352
return lazyAllowedTypesIdentifiers.value;
353353
}
354354

355-
public static get simpleAllowedTypes(): ReadonlyMap<string, SimpleAllowedTypes> {
355+
public static get simpleAllowedTypes(): ReadonlyMap<string, SimpleAllowedTypesAttributes> {
356356
return lazySimpleAllowedTypes.value;
357357
}
358358

packages/dds/tree/src/simple-tree/simpleSchema.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export interface SimpleArrayNodeSchema<out TCustomMetadata = unknown>
9191
* @remarks Refers to the types by identifier.
9292
* A {@link SimpleTreeSchema} is needed to resolve these identifiers to their schema {@link SimpleTreeSchema.definitions}.
9393
*/
94-
readonly simpleAllowedTypes: ReadonlyMap<string, SimpleAllowedTypes>;
94+
readonly simpleAllowedTypes: ReadonlyMap<string, SimpleAllowedTypesAttributes>;
9595
}
9696

9797
/**
@@ -108,7 +108,7 @@ export interface SimpleMapNodeSchema<out TCustomMetadata = unknown>
108108
* @remarks Refers to the types by identifier.
109109
* A {@link SimpleTreeSchema} is needed to resolve these identifiers to their schema {@link SimpleTreeSchema.definitions}.
110110
*/
111-
readonly simpleAllowedTypes: ReadonlyMap<string, SimpleAllowedTypes>;
111+
readonly simpleAllowedTypes: ReadonlyMap<string, SimpleAllowedTypesAttributes>;
112112
}
113113

114114
/**
@@ -125,7 +125,7 @@ export interface SimpleRecordNodeSchema<out TCustomMetadata = unknown>
125125
* @remarks Refers to the types by identifier.
126126
* A {@link SimpleTreeSchema} is needed to resolve these identifiers to their schema {@link SimpleTreeSchema.definitions}.
127127
*/
128-
readonly simpleAllowedTypes: ReadonlyMap<string, SimpleAllowedTypes>;
128+
readonly simpleAllowedTypes: ReadonlyMap<string, SimpleAllowedTypesAttributes>;
129129
}
130130

131131
/**
@@ -168,7 +168,7 @@ export type SimpleNodeSchema =
168168
* @alpha
169169
* @sealed
170170
*/
171-
export interface SimpleAllowedTypes {
171+
export interface SimpleAllowedTypesAttributes {
172172
/**
173173
* True if this schema is included as a {@link SchemaStaticsAlpha.staged | staged} schema upgrade,
174174
* allowing the view schema be compatible with stored schema with (post upgrade) or without it (pre-upgrade).
@@ -201,7 +201,7 @@ export interface SimpleFieldSchema {
201201
* @remarks Refers to the types by identifier.
202202
* A {@link SimpleTreeSchema} is needed to resolve these identifiers to their schema {@link SimpleTreeSchema.definitions}.
203203
*/
204-
readonly simpleAllowedTypes: ReadonlyMap<string, SimpleAllowedTypes>;
204+
readonly simpleAllowedTypes: ReadonlyMap<string, SimpleAllowedTypesAttributes>;
205205

206206
/**
207207
* {@inheritDoc FieldSchemaMetadata}

packages/dds/tree/src/test/simple-tree/api/simpleSchemaToJsonSchema.spec.ts

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import {
2121
} from "../../../simple-tree/index.js";
2222
import { getJsonValidator } from "./jsonSchemaUtilities.js";
2323
import type {
24-
SimpleAllowedTypes,
24+
SimpleAllowedTypesAttributes,
2525
SimpleNodeSchema,
2626
SimpleTreeSchema,
2727
// eslint-disable-next-line import/no-internal-modules
@@ -50,7 +50,7 @@ describe("simpleSchemaToJsonSchema", () => {
5050
root: {
5151
kind: FieldKind.Required,
5252
metadata: {},
53-
simpleAllowedTypes: new Map<string, SimpleAllowedTypes>([
53+
simpleAllowedTypes: new Map<string, SimpleAllowedTypesAttributes>([
5454
[stringSchema.identifier, { isStaged: false }],
5555
]),
5656
},
@@ -88,7 +88,7 @@ describe("simpleSchemaToJsonSchema", () => {
8888
root: {
8989
kind: FieldKind.Required,
9090
metadata: {},
91-
simpleAllowedTypes: new Map<string, SimpleAllowedTypes>([
91+
simpleAllowedTypes: new Map<string, SimpleAllowedTypesAttributes>([
9292
["test.handle", { isStaged: false }],
9393
]),
9494
},
@@ -112,7 +112,7 @@ describe("simpleSchemaToJsonSchema", () => {
112112
const input: SimpleTreeSchema = {
113113
root: {
114114
kind: FieldKind.Required,
115-
simpleAllowedTypes: new Map<string, SimpleAllowedTypes>([
115+
simpleAllowedTypes: new Map<string, SimpleAllowedTypesAttributes>([
116116
["test.array", { isStaged: false }],
117117
]),
118118
metadata: {},
@@ -124,7 +124,7 @@ describe("simpleSchemaToJsonSchema", () => {
124124
kind: NodeKind.Array,
125125
metadata: {},
126126
persistedMetadata: undefined,
127-
simpleAllowedTypes: new Map<string, SimpleAllowedTypes>([
127+
simpleAllowedTypes: new Map<string, SimpleAllowedTypesAttributes>([
128128
[stringSchema.identifier, { isStaged: false }],
129129
]),
130130
},
@@ -169,7 +169,7 @@ describe("simpleSchemaToJsonSchema", () => {
169169
const input: SimpleTreeSchema = {
170170
root: {
171171
kind: FieldKind.Required,
172-
simpleAllowedTypes: new Map<string, SimpleAllowedTypes>([
172+
simpleAllowedTypes: new Map<string, SimpleAllowedTypesAttributes>([
173173
["test.map", { isStaged: false }],
174174
]),
175175
metadata: {},
@@ -181,7 +181,7 @@ describe("simpleSchemaToJsonSchema", () => {
181181
kind: NodeKind.Map,
182182
metadata: {},
183183
persistedMetadata: undefined,
184-
simpleAllowedTypes: new Map<string, SimpleAllowedTypes>([
184+
simpleAllowedTypes: new Map<string, SimpleAllowedTypesAttributes>([
185185
[stringSchema.identifier, { isStaged: false }],
186186
]),
187187
},
@@ -238,7 +238,7 @@ describe("simpleSchemaToJsonSchema", () => {
238238
const input: SimpleTreeSchema = {
239239
root: {
240240
kind: FieldKind.Required,
241-
simpleAllowedTypes: new Map<string, SimpleAllowedTypes>([
241+
simpleAllowedTypes: new Map<string, SimpleAllowedTypesAttributes>([
242242
["test.record", { isStaged: false }],
243243
]),
244244
metadata: {},
@@ -250,7 +250,7 @@ describe("simpleSchemaToJsonSchema", () => {
250250
kind: NodeKind.Record,
251251
metadata: {},
252252
persistedMetadata: undefined,
253-
simpleAllowedTypes: new Map<string, SimpleAllowedTypes>([
253+
simpleAllowedTypes: new Map<string, SimpleAllowedTypesAttributes>([
254254
[stringSchema.identifier, { isStaged: false }],
255255
]),
256256
},
@@ -354,7 +354,7 @@ describe("simpleSchemaToJsonSchema", () => {
354354
root: {
355355
kind: FieldKind.Required,
356356
metadata: {},
357-
simpleAllowedTypes: new Map<string, SimpleAllowedTypes>([
357+
simpleAllowedTypes: new Map<string, SimpleAllowedTypesAttributes>([
358358
["test.object", { isStaged: false }],
359359
]),
360360
},
@@ -370,7 +370,7 @@ describe("simpleSchemaToJsonSchema", () => {
370370
"foo",
371371
{
372372
kind: FieldKind.Optional,
373-
simpleAllowedTypes: new Map<string, SimpleAllowedTypes>([
373+
simpleAllowedTypes: new Map<string, SimpleAllowedTypesAttributes>([
374374
[numberSchema.identifier, { isStaged: false }],
375375
]),
376376
metadata: { description: "A number representing the concept of Foo." },
@@ -382,7 +382,7 @@ describe("simpleSchemaToJsonSchema", () => {
382382
"bar",
383383
{
384384
kind: FieldKind.Required,
385-
simpleAllowedTypes: new Map<string, SimpleAllowedTypes>([
385+
simpleAllowedTypes: new Map<string, SimpleAllowedTypesAttributes>([
386386
[stringSchema.identifier, { isStaged: false }],
387387
]),
388388
metadata: { description: "A string representing the concept of Bar." },
@@ -394,7 +394,7 @@ describe("simpleSchemaToJsonSchema", () => {
394394
"id",
395395
{
396396
kind: FieldKind.Identifier,
397-
simpleAllowedTypes: new Map<string, SimpleAllowedTypes>([
397+
simpleAllowedTypes: new Map<string, SimpleAllowedTypesAttributes>([
398398
[stringSchema.identifier, { isStaged: false }],
399399
]),
400400
metadata: {
@@ -499,7 +499,7 @@ describe("simpleSchemaToJsonSchema", () => {
499499
root: {
500500
kind: FieldKind.Required,
501501
metadata: {},
502-
simpleAllowedTypes: new Map<string, SimpleAllowedTypes>([
502+
simpleAllowedTypes: new Map<string, SimpleAllowedTypesAttributes>([
503503
["test.object", { isStaged: false }],
504504
]),
505505
},
@@ -515,7 +515,7 @@ describe("simpleSchemaToJsonSchema", () => {
515515
"id",
516516
{
517517
kind: FieldKind.Identifier,
518-
simpleAllowedTypes: new Map<string, SimpleAllowedTypes>([
518+
simpleAllowedTypes: new Map<string, SimpleAllowedTypesAttributes>([
519519
[stringSchema.identifier, { isStaged: false }],
520520
]),
521521
storedKey: "id",
@@ -559,7 +559,7 @@ describe("simpleSchemaToJsonSchema", () => {
559559
root: {
560560
kind: FieldKind.Required,
561561
metadata: {},
562-
simpleAllowedTypes: new Map<string, SimpleAllowedTypes>([
562+
simpleAllowedTypes: new Map<string, SimpleAllowedTypesAttributes>([
563563
["test.object", { isStaged: false }],
564564
]),
565565
},
@@ -577,7 +577,7 @@ describe("simpleSchemaToJsonSchema", () => {
577577
kind: FieldKind.Required,
578578
metadata: {},
579579
persistedMetadata: undefined,
580-
simpleAllowedTypes: new Map<string, SimpleAllowedTypes>([
580+
simpleAllowedTypes: new Map<string, SimpleAllowedTypesAttributes>([
581581
[numberSchema.identifier, { isStaged: false }],
582582
[stringSchema.identifier, { isStaged: false }],
583583
]),
@@ -629,7 +629,7 @@ describe("simpleSchemaToJsonSchema", () => {
629629
root: {
630630
kind: FieldKind.Required,
631631
metadata: {},
632-
simpleAllowedTypes: new Map<string, SimpleAllowedTypes>([
632+
simpleAllowedTypes: new Map<string, SimpleAllowedTypesAttributes>([
633633
["test.recursive-object", { isStaged: false }],
634634
]),
635635
},
@@ -647,7 +647,7 @@ describe("simpleSchemaToJsonSchema", () => {
647647
kind: FieldKind.Optional,
648648
metadata: {},
649649
persistedMetadata: undefined,
650-
simpleAllowedTypes: new Map<string, SimpleAllowedTypes>([
650+
simpleAllowedTypes: new Map<string, SimpleAllowedTypesAttributes>([
651651
[stringSchema.identifier, { isStaged: false }],
652652
["test.recursive-object", { isStaged: false }],
653653
]),

0 commit comments

Comments
 (0)