Skip to content

Commit

Permalink
Merge pull request #497 from contember/docs-types
Browse files Browse the repository at this point in the history
improve types, add some jsdoc, cs fix
  • Loading branch information
matej21 committed May 11, 2023
2 parents 03db5fd + 4d7ad6a commit e7fa2d2
Show file tree
Hide file tree
Showing 315 changed files with 4,120 additions and 2,210 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
node_modules
ee/*/dist
ee/*/node_modules
ee/*/temp
packages/*/dist
packages/*/node_modules
packages/*/temp
4 changes: 4 additions & 0 deletions build/api-extractor.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
"ae-missing-release-tag": {
"logLevel": "none",
"addToApiReportFile": false
},
"ae-internal-missing-underscore": {
"logLevel": "none",
"addToApiReportFile": false
}
}
},
Expand Down
951 changes: 747 additions & 204 deletions build/api/admin.api.md

Large diffs are not rendered by default.

80 changes: 36 additions & 44 deletions build/api/binding.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,10 @@ import type { TreeFilter } from '@contember/client';
export function AccessorProvider(props: EntityProviderProps): JSX.Element;

// @public (undocumented)
export function AccessorTree({ state, children }: AccessorTreeProps): JSX.Element;

// @public (undocumented)
export namespace AccessorTree {
var // (undocumented)
export const AccessorTree: {
({ state, children }: AccessorTreeProps): JSX.Element;
displayName: string;
}
};

// @public (undocumented)
export interface AccessorTreeProps {
Expand Down Expand Up @@ -210,7 +207,7 @@ export class DataBinding {
// @public (undocumented)
export const DataBindingExtendAborted: unique symbol;

// @public (undocumented)
// @public
export const DataBindingProvider: <StateProps>(props: DataBindingProviderProps<StateProps>) => ReactElement;

// @public (undocumented)
Expand Down Expand Up @@ -587,7 +584,7 @@ export type EntityListProps<ListProps> = EntityListBaseProps & ({} | {
listProps?: ListProps;
});

// @public (undocumented)
// @public
export const EntityListSubTree: <ListProps, EntityProps>(props: EntityListSubTreeProps<ListProps, EntityProps>) => ReactElement;

// @public (undocumented)
Expand Down Expand Up @@ -637,7 +634,7 @@ export interface EntityProviderProps {
// @public (undocumented)
export type EntityRealmKey = string;

// @public (undocumented)
// @public
export const EntitySubTree: <EntityProps>(pros: EntitySubTreeProps<EntityProps>) => ReactElement;

// @public (undocumented)
Expand Down Expand Up @@ -1130,6 +1127,9 @@ export interface FieldEventListeners {
// @public (undocumented)
export type FieldEventListenerStore<Value extends FieldValue = FieldValue> = EventListenersStore<keyof Events_3<Value>, Partial<Events_3<Value>>>;

// @public (undocumented)
export type FieldEventListenerValue<E extends keyof FieldAccessor.FieldEventListenerMap, Persisted extends FieldValue = FieldValue> = Events_3<Persisted>[E] | Set<Events_3<Persisted>[E]>;

// @public
export class FieldMarker {
constructor(fieldName: FieldName, defaultValue?: FieldValue | undefined, isNonbearing?: boolean);
Expand Down Expand Up @@ -1167,7 +1167,7 @@ export interface FieldRuntimeProps<Persisted extends FieldValue = FieldValue> {
// @public (undocumented)
export type FieldValue = JsonValue;

// @public (undocumented)
// @public
export const FieldView: {
<FV1 extends FieldValue>(props: FieldViewCommonProps & {
field: SRSF;
Expand Down Expand Up @@ -1756,10 +1756,9 @@ export const QualifiedEntityParametersDefaults: {
};

// @public (undocumented)
export interface QualifiedFieldList extends EntityListParameters, QualifiedEntityParameters, AnyField, LeafField {
// (undocumented)
export type QualifiedFieldList = EntityListParameters & QualifiedEntityParameters & AnyField & LeafField & {
hasOneRelationPath: HasOneRelation[];
}
};

// @public (undocumented)
export interface QualifiedSingleEntity extends QualifiedSingleEntityParameters, SingleEntityParameters, QualifiedEntityParameters, EntityCreationParameters, SingleEntityEventListeners {
Expand Down Expand Up @@ -1874,10 +1873,9 @@ export interface RelativeSingleEntity {
}

// @public (undocumented)
export interface RelativeSingleField extends AnyField, LeafField {
// (undocumented)
export type RelativeSingleField = AnyField & LeafField & {
hasOneRelationPath: HasOneRelation[];
}
};

// @public (undocumented)
export type RemovalType = 'disconnect' | 'delete';
Expand Down Expand Up @@ -2146,10 +2144,9 @@ export interface SugarableQualifiedEntityParameters {
}

// @public (undocumented)
export interface SugarableQualifiedFieldList extends SugarableEntityListParameters, SugarableQualifiedEntityParameters, SugarableAnyField {
// (undocumented)
export type SugarableQualifiedFieldList = SugarableEntityListParameters & SugarableQualifiedEntityParameters & SugarableAnyField & {
hasOneRelationPath?: SugarableHasOneRelation[] | SugarableHasOneRelation;
}
};

// @public (undocumented)
export interface SugarableQualifiedSingleEntity extends SugarableQualifiedSingleEntityParameters, SugarableSingleEntityParameters, SugarableQualifiedEntityParameters {
Expand Down Expand Up @@ -2182,10 +2179,9 @@ export interface SugarableRelativeSingleEntity {
}

// @public (undocumented)
export interface SugarableRelativeSingleField extends SugarableAnyField {
// (undocumented)
export type SugarableRelativeSingleField = SugarableAnyField & {
hasOneRelationPath?: SugarableHasOneRelation[] | SugarableHasOneRelation;
}
};

// @public (undocumented)
export interface SugarableSingleEntityParameters {
Expand Down Expand Up @@ -2231,10 +2227,9 @@ export interface SugaredQualifiedEntityList extends UnsugarableQualifiedEntityLi
}

// @public (undocumented)
export interface SugaredQualifiedFieldList extends UnsugarableQualifiedFieldList {
// (undocumented)
export type SugaredQualifiedFieldList = UnsugarableQualifiedFieldList & {
fields: string | SugarableQualifiedFieldList;
}
};

// @public (undocumented)
export interface SugaredQualifiedSingleEntity extends UnsugarableQualifiedSingleEntity {
Expand All @@ -2255,10 +2250,9 @@ export interface SugaredRelativeSingleEntity extends UnsugarableRelativeSingleEn
}

// @public (undocumented)
export interface SugaredRelativeSingleField extends UnsugarableRelativeSingleField {
// (undocumented)
export type SugaredRelativeSingleField = UnsugarableRelativeSingleField & {
field: string | SugarableRelativeSingleField;
}
};

// @public (undocumented)
export type SugaredSetOnCreate = SugaredUniqueWhere | SugaredUniqueWhere[] | Exclude<SetOnCreate, undefined>;
Expand Down Expand Up @@ -2459,8 +2453,10 @@ export interface UnsugarableEntityListPreferences {
}

// @public (undocumented)
export type UnsugarableFieldEventListeners<Persisted extends FieldValue = FieldValue, Produced extends Persisted = Persisted> = {
[EventName in keyof Events_3 & string as `on${Capitalize<EventName>}`]?: Events_3[EventName] | Set<Events_3[EventName]>;
export type UnsugarableFieldEventListeners<Persisted extends FieldValue = FieldValue> = {
onInitialize?: FieldEventListenerValue<'initialize', Persisted>;
onBeforeUpdate?: FieldEventListenerValue<'beforeUpdate', Persisted>;
onUpdate?: FieldEventListenerValue<'update', Persisted>;
};

// @public (undocumented)
Expand All @@ -2472,12 +2468,10 @@ export interface UnsugarableHasOneRelation extends UnsugarableRelation, Unsugara
}

// @public (undocumented)
export interface UnsugarableLeafField extends UnsugarableFieldEventListeners {
// (undocumented)
defaultValue?: OptionallyVariableFieldValue;
// (undocumented)
export type UnsugarableLeafField = UnsugarableFieldEventListeners & {
isNonbearing?: boolean;
}
defaultValue?: OptionallyVariableFieldValue;
};

// @public (undocumented)
export interface UnsugarableParentEntityParameters extends UnsugarableSingleEntityEventListeners {
Expand All @@ -2498,8 +2492,7 @@ export interface UnsugarableQualifiedEntityParameters {
}

// @public (undocumented)
export interface UnsugarableQualifiedFieldList extends UnsugarableEntityListParameters, UnsugarableQualifiedEntityParameters, UnsugarableLeafField {
}
export type UnsugarableQualifiedFieldList = UnsugarableEntityListParameters & UnsugarableQualifiedEntityParameters & UnsugarableLeafField;

// @public (undocumented)
export interface UnsugarableQualifiedSingleEntity extends UnsugarableQualifiedEntityParameters, UnsugarableEntityCreationParameters, UnsugarableSingleEntityEventListeners {
Expand All @@ -2522,8 +2515,7 @@ export interface UnsugarableRelativeSingleEntity extends UnsugarableHasOneRelati
}

// @public (undocumented)
export interface UnsugarableRelativeSingleField extends UnsugarableLeafField {
}
export type UnsugarableRelativeSingleField = UnsugarableLeafField;

// @public (undocumented)
export type UnsugarableSingleEntityEventListeners = {
Expand Down Expand Up @@ -2751,11 +2743,11 @@ export const wrapFilterInHasOnes: (path: HasOneRelation[], filter: Filter) => Fi

// Warnings were encountered during analysis:
//
// src/helperComponents/FieldView.tsx:34:23 - (ae-forgotten-export) The symbol "FieldViewCommonProps" needs to be exported by the entry point index.d.ts
// src/helperComponents/FieldView.tsx:34:23 - (ae-forgotten-export) The symbol "REN" needs to be exported by the entry point index.d.ts
// src/helperComponents/FieldView.tsx:36:1 - (ae-forgotten-export) The symbol "SRSF" needs to be exported by the entry point index.d.ts
// src/helperComponents/FieldView.tsx:95:33 - (ae-forgotten-export) The symbol "RN" needs to be exported by the entry point index.d.ts
// src/helperComponents/FieldView.tsx:128:1 - (ae-forgotten-export) The symbol "FieldViewProps" needs to be exported by the entry point index.d.ts
// src/helperComponents/FieldView.tsx:47:23 - (ae-forgotten-export) The symbol "FieldViewCommonProps" needs to be exported by the entry point index.d.ts
// src/helperComponents/FieldView.tsx:47:23 - (ae-forgotten-export) The symbol "REN" needs to be exported by the entry point index.d.ts
// src/helperComponents/FieldView.tsx:49:1 - (ae-forgotten-export) The symbol "SRSF" needs to be exported by the entry point index.d.ts
// src/helperComponents/FieldView.tsx:108:33 - (ae-forgotten-export) The symbol "RN" needs to be exported by the entry point index.d.ts
// src/helperComponents/FieldView.tsx:141:1 - (ae-forgotten-export) The symbol "FieldViewProps" needs to be exported by the entry point index.d.ts

// (No @packageDocumentation comment for this package)

Expand Down

0 comments on commit e7fa2d2

Please sign in to comment.