Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/internal/field-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ export interface StoredRow {
[field: string]: StoredValue;
}

/**
* The name {@link StoredRow} had before 0.7.0.
*
* @deprecated Use {@link StoredRow}.
*/
export type RowFields = StoredRow;

/** Parse outcome accepting the field value, carrying the value to write. */
export interface FieldParseSuccess {
success: true;
Expand Down
1 change: 1 addition & 0 deletions src/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export type {
FieldValidationResult,
FieldValue,
FieldValues,
RowFields,
StoredRow,
ForeignOptions,
FieldValidator,
Expand Down
4 changes: 3 additions & 1 deletion src/tests/index/consumer_declarations.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { Table } from "@antelopejs/interface-database-decorators";
import { LocalizationModifier } from "@antelopejs/interface-database-decorators/modifiers/localization";
import { DataController, DefaultRoutes, RegisterDataController } from "@antelopejs/interface-data-api";
import { Query, Validation } from "@antelopejs/interface-data-api/components";
import { Access, AccessMode, ModifierKey, type StoredRow } from "@antelopejs/interface-data-api/metadata";
import { Access, AccessMode, ModifierKey, type RowFields, type StoredRow } from "@antelopejs/interface-data-api/metadata";

class Article extends Table {
declare title: string;
Expand All @@ -29,6 +29,8 @@ export class ArticleAPI extends DataController(Article, DefaultRoutes.All, Contr
export const read: typeof Query.ReadProperties = Query.ReadProperties;
export const clear: typeof Validation.ClearInternal = Validation.ClearInternal;
export const row: StoredRow = { title: "a" };
export const legacyRow: RowFields = row;
export const legacyGet: typeof DefaultRoutes.Get extends { func: (...args: never[]) => Promise<RowFields> | RowFields } ? true : false = true;
`;

/** The diagnostics of a module that imports this package's built declarations, library declarations checked too. */
Expand Down
Loading