import { IfcOpenshellFile } from '@ifcopenshell/wasm/api'; import type { AttributeValueType, EntityInstance } from './entity_instance.js'; /** Options controlling IFC byte-stream loading. */ export interface OpenOptions { /** Abort opening before native parsing begins. */ signal?: AbortSignal; /** Open the native file in read-only mode when supported. */ readonly?: boolean; } export interface GetInverseOptions { allowDuplicate?: boolean; withAttributeIndices?: boolean; } /** High-level wrapper for an IFC file and its entity graph. */ export declare class File extends IfcOpenshellFile { /** Create an empty file, or take ownership of an existing native file handle. */ constructor(schemaOrHandle?: string | IfcOpenshellFile); /** Open IFC STEP bytes and retain ownership of the native file. */ static open(bytes: Uint8Array | ArrayBuffer, filename?: string, options?: OpenOptions): File; get maxId(): number; get ids(): number[]; get entityCount(): number; byId: (id: number) => EntityInstance; byGuid: (guid: string) => EntityInstance; byType: (typeName: string) => EntityInstance[]; byTypeExclSubtypes: (typeName: string) => EntityInstance[]; traverse: (entity: EntityInstance, maxDepth: number) => EntityInstance[]; traverseBreadthFirst: (entity: EntityInstance, maxDepth: number) => EntityInstance[]; /** Create an entity with any of its IFC attributes, using their schema names. */ create(ifcClass: string, attributes?: Record): EntityInstance; /** General IFC schema version, without addendum or technical corrigendum suffixes. */ schema(): string; /** Add an entity, assigning a new id unless `instanceId` is given explicitly. */ add(entity: EntityInstance, instanceId?: number): EntityInstance; getInverse(entity: EntityInstance, options: { allowDuplicate?: false; withAttributeIndices?: false; }): Set; getInverse(entity: EntityInstance, options: { allowDuplicate: true; withAttributeIndices: true; }): [EntityInstance, number][]; getInverse(entity: EntityInstance, options: { allowDuplicate: true; withAttributeIndices?: false; }): EntityInstance[]; getInverse(entity: EntityInstance): Set; getInverse(entity: EntityInstance, options: GetInverseOptions): Set | EntityInstance[] | [EntityInstance, number][]; } /** Parse IFC bytes after explicitly loading their schema plugin. */ export declare function open(bytes: Uint8Array | ArrayBuffer, filename?: string, options?: OpenOptions): File; //# sourceMappingURL=file.d.ts.map