Skip to content

Commit 155ce30

Browse files
committed
run prettier
1 parent f5f5910 commit 155ce30

File tree

1 file changed

+13
-5
lines changed
  • packages/typespec-azure-resource-manager/src

1 file changed

+13
-5
lines changed

packages/typespec-azure-resource-manager/src/resource.ts

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -632,9 +632,13 @@ function isVariableSegment(segment: string, singletonResourceName?: string): boo
632632
function getResourceInfo(
633633
program: Program,
634634
operation: ArmResourceOperation,
635-
singletonResourceName: string | undefined
635+
singletonResourceName: string | undefined,
636636
): ResolvedResourceInfo | undefined {
637-
const pathInfo = getResourcePathElements(operation.httpOperation.path, operation.kind, singletonResourceName);
637+
const pathInfo = getResourcePathElements(
638+
operation.httpOperation.path,
639+
operation.kind,
640+
singletonResourceName,
641+
);
638642
if (pathInfo === undefined) return undefined;
639643
return {
640644
...pathInfo,
@@ -659,7 +663,10 @@ export function getResourcePathElements(
659663
}
660664

661665
// if the next segment is the last segment
662-
if (i + 1 === segments.length - 1 && isVariableSegment(segments[i + 1], singletonResourceName)) {
666+
if (
667+
i + 1 === segments.length - 1 &&
668+
isVariableSegment(segments[i + 1], singletonResourceName)
669+
) {
663670
typeSegments.push(segments[i]);
664671
instanceSegments.push(segments[i]);
665672
instanceSegments.push(segments[i + 1]);
@@ -873,7 +880,7 @@ export function resolveArmResourceOperations(
873880

874881
if (armOperation === undefined) continue;
875882
armOperation.kind = operation.kind;
876-
const singletonResourceName = getSingletonResourceKey(program, resourceType)
883+
const singletonResourceName = getSingletonResourceKey(program, resourceType);
877884

878885
armOperation.resourceModelName = operation.resource?.name ?? resourceType.name;
879886
const resourceInfo = getResourceInfo(program, armOperation, singletonResourceName);
@@ -905,7 +912,8 @@ export function resolveArmResourceOperations(
905912
resourceType: resourceInfo.resourceType,
906913
resourceInstancePath: resourceInfo.resourceInstancePath,
907914
resourceName: resourceInfo.resourceName,
908-
singletonResourceNames: singletonResourceName !== undefined ? [singletonResourceName] : undefined,
915+
singletonResourceNames:
916+
singletonResourceName !== undefined ? [singletonResourceName] : undefined,
909917
operations: {
910918
lifecycle: {
911919
read: undefined,

0 commit comments

Comments
 (0)