Skip to content

Commit 4ceec0c

Browse files
tsp, pin cadl-ranch-expect (#2941)
1 parent 16e2939 commit 4ceec0c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

typespec-extension/src/code-model-builder.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2159,14 +2159,14 @@ export class CodeModelBuilder {
21592159
case "Model":
21602160
if (isArrayModelType(this.program, type)) {
21612161
++option.depth;
2162-
if (option.depth == 1) {
2162+
if (option.depth === 1) {
21632163
return this.getUnionVariantName(type.indexer.value, option) + "List";
21642164
} else {
21652165
return "ListOf" + this.getUnionVariantName(type.indexer.value, option);
21662166
}
21672167
} else if (isRecordModelType(this.program, type)) {
21682168
++option.depth;
2169-
if (option.depth == 1) {
2169+
if (option.depth === 1) {
21702170
return this.getUnionVariantName(type.indexer.value, option) + "Map";
21712171
} else {
21722172
return "MapOf" + this.getUnionVariantName(type.indexer.value, option);
@@ -2483,7 +2483,7 @@ export class CodeModelBuilder {
24832483
schema.properties?.forEach((p) => {
24842484
if (p.readOnly && schemaUsage.usage?.includes(SchemaContext.Input)) {
24852485
const schemaUsageWithoutInput = {
2486-
usage: schemaUsage.usage.filter((it) => it != SchemaContext.Input),
2486+
usage: schemaUsage.usage.filter((it) => it !== SchemaContext.Input),
24872487
serializationFormats: schemaUsage.serializationFormats,
24882488
};
24892489
innerApplySchemaUsage(p.schema, schemaUsageWithoutInput);

typespec-tests/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
},
1111
"dependencies": {
1212
"@azure-tools/cadl-ranch-specs": "0.36.1",
13+
"@azure-tools/cadl-ranch-expect": "0.15.1",
1314
"@azure-tools/typespec-java": "file:/../typespec-extension/azure-tools-typespec-java-0.20.1.tgz"
1415
},
1516
"devDependencies": {

0 commit comments

Comments
 (0)