@@ -127,7 +127,7 @@ export type ShardingStrategy =
127127/**
128128 * Type of document reference.
129129 *
130- * See {@link Collection .list}.
130+ * See {@link DocumentCollection.list} and { @link EdgeCollection .list}.
131131 *
132132 * @deprecated Simple Queries have been deprecated in ArangoDB 3.4 and can be
133133 * replaced with AQL queries.
@@ -325,7 +325,7 @@ export type ValidationOptions = {
325325/**
326326 * Options for setting a collection's properties.
327327 *
328- * See {@link Collection .properties}.
328+ * See {@link DocumentCollection.properties} and { @link EdgeCollection .properties}.
329329 */
330330export type CollectionPropertiesOptions = {
331331 /**
@@ -1184,7 +1184,7 @@ export type CollectionEdgesResult<T extends object = any> = {
11841184/**
11851185 * Result of removing documents by an example.
11861186 *
1187- * See {@link Collection .removeByExample}.
1187+ * See {@link DocumentCollection.removeByExample} and { @link EdgeCollection .removeByExample}.
11881188 *
11891189 * @deprecated Simple Queries have been deprecated in ArangoDB 3.4 and can be
11901190 * replaced with AQL queries.
@@ -1199,7 +1199,7 @@ export type SimpleQueryRemoveByExampleResult = {
11991199/**
12001200 * Result of replacing documents by an example.
12011201 *
1202- * See {@link Collection .replaceByExample}.
1202+ * See {@link DocumentCollection.replaceByExample} and { @link EdgeCollection .replaceByExample}.
12031203 *
12041204 * @deprecated Simple Queries have been deprecated in ArangoDB 3.4 and can be
12051205 * replaced with AQL queries.
@@ -1214,7 +1214,7 @@ export type SimpleQueryReplaceByExampleResult = {
12141214/**
12151215 * Result of updating documents by an example.
12161216 *
1217- * See {@link Collection .updateByExample}.
1217+ * See {@link DocumentCollection.updateByExample} and { @link EdgeCollection .updateByExample}.
12181218 *
12191219 * @deprecated Simple Queries have been deprecated in ArangoDB 3.4 and can be
12201220 * replaced with AQL queries.
@@ -1229,7 +1229,7 @@ export type SimpleQueryUpdateByExampleResult = {
12291229/**
12301230 * Result of removing documents by keys.
12311231 *
1232- * See {@link Collection .removeByKeys}.
1232+ * See {@link DocumentCollection.removeByKeys} and { @link EdgeCollection .removeByKeys}.
12331233 *
12341234 * @deprecated Simple Queries have been deprecated in ArangoDB 3.4 and can be
12351235 * replaced with AQL queries.
@@ -1256,6 +1256,20 @@ export type SimpleQueryRemoveByKeysResult<T extends object = any> = {
12561256 *
12571257 * See {@link EdgeCollection} for a variant of this interface more suited for
12581258 * edge collections.
1259+ *
1260+ * When using TypeScript, collections can be cast to a specific document data
1261+ * type to increase type safety.
1262+ *
1263+ * @param T - Type to use for document data. Defaults to `any`.
1264+ *
1265+ * @example
1266+ * ```ts
1267+ * interface Person {
1268+ * name: string;
1269+ * }
1270+ * const db = new Database();
1271+ * const documents = db.collection("persons") as DocumentCollection<Person>;
1272+ * ```
12591273 */
12601274export interface DocumentCollection < T extends object = any >
12611275 extends ArangoCollection {
@@ -2335,6 +2349,21 @@ export interface DocumentCollection<T extends object = any>
23352349 *
23362350 * See {@link DocumentCollection} for a more generic variant of this interface
23372351 * more suited for regular document collections.
2352+ *
2353+ * When using TypeScript, collections can be cast to a specific edge document
2354+ * data type to increase type safety.
2355+ *
2356+ * @param T - Type to use for edge document data. Defaults to `any`.
2357+ *
2358+ * @example
2359+ * ```ts
2360+ * interface Friend {
2361+ * startDate: number;
2362+ * endDate?: number;
2363+ * }
2364+ * const db = new Database();
2365+ * const edges = db.collection("friends") as EdgeCollection<Friend>;
2366+ * ```
23382367 */
23392368export interface EdgeCollection < T extends object = any >
23402369 extends DocumentCollection < T > {
@@ -2965,26 +2994,8 @@ export interface EdgeCollection<T extends object = any>
29652994}
29662995
29672996/**
2968- * The `Collection` type represents a collection in a {@link Database}.
2969- *
2970- * When using TypeScript, collections can be cast to {@link DocumentCollection}
2971- * or {@link EdgeCollection} in order to increase type safety.
2972- *
2973- * @param T - Type to use for document data. Defaults to `any`.
2974- *
2975- * @example
2976- * ```ts
2977- * interface Person {
2978- * name: string;
2979- * }
2980- * interface Friend {
2981- * startDate: number;
2982- * endDate?: number;
2983- * }
2984- * const db = new Database();
2985- * const documents = db.collection("persons") as DocumentCollection<Person>;
2986- * const edges = db.collection("friends") as EdgeCollection<Friend>;
2987- * ```
2997+ * @internal
2998+ * @hidden
29882999 */
29893000export class Collection < T extends object = any >
29903001 implements EdgeCollection < T > , DocumentCollection < T > {
0 commit comments