import { Table } from './table'; import { ObjectRef, WeaveObject, WeaveObjectParameters } from './weaveObject'; interface DatasetParameters extends WeaveObjectParameters { rows: R[]; } export declare class DatasetRowRef { projectId: string; objId: string; digest: string; rowDigest: string; constructor(projectId: string, objId: string, digest: string, rowDigest: string); uri(): string; } export type DatasetRow = Record & { __savedRef?: DatasetRowRef | Promise; }; /** * Dataset object with easy saving and automatic versioning * * @example * // Create a dataset * const dataset = new Dataset({ * id: 'grammar-dataset', * rows: [ * { id: '0', sentence: "He no likes ice cream.", correction: "He doesn't like ice cream." }, * { id: '1', sentence: "She goed to the store.", correction: "She went to the store." }, * { id: '2', sentence: "They plays video games all day.", correction: "They play video games all day." } * ] * }) * * // Access a specific example * const exampleLabel = dataset.getRow(2).sentence; * * // Save the dataset * const ref = await dataset.save() * */ export declare class Dataset extends WeaveObject { rows: Table; constructor(parameters: DatasetParameters); save(): Promise; get length(): number; [Symbol.asyncIterator](): AsyncIterator; getRow(index: number): R; } export {}; //# sourceMappingURL=dataset.d.ts.map