/** * ------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. * See License in the project root for license information. * ------------------------------------------------------------------------------------------- */ import { isUntypedNode } from "./untypedNode.js"; /** * Type guard to assert that an object instance is an UntypedObject. * @param node The object to check. * @returns boolean indicating if the node is an UntypedObject. */ export const isUntypedObject = (node) => { const proposedNode = node; return proposedNode && proposedNode.value instanceof Object && proposedNode.value instanceof Array === false && Object.values(proposedNode.value).every((item) => isUntypedNode(item)); }; /** * Factory to create an UntypedObject from a Record. * @param value The Record value to create from. * @returns The created UntypedObject. */ export const createUntypedObject = (value) => { return { value, getValue: () => value, }; }; //# sourceMappingURL=untypedObject.js.map