Skip to content

Commit

Permalink
Tag SharedString, SharedMatrix, SharedMap, and SharedDirectory as alp…
Browse files Browse the repository at this point in the history
…ha (#18652)

This PR tags the SharedString, SharedMatrix, SharedMap, and
SharedDirectory as alpha. All these types were automatically identified
as transitive dependency of the SharedString, SharedMatrix, SharedMap,
and SharedDirectory.

We will stage these commits and invite review, however review items will
generally be added to the backlog as future items, as these type updates
are necessary for the current state of the code base.

Co-authored-by: Tony Murphy <[email protected]>
  • Loading branch information
anthony-murphy and anthony-murphy authored Dec 5, 2023
1 parent 589c808 commit b83d208
Show file tree
Hide file tree
Showing 43 changed files with 243 additions and 245 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ export enum SignalType {
// @alpha
export type SummaryObject = ISummaryTree | ISummaryBlob | ISummaryHandle | ISummaryAttachment;

// @internal
// @alpha
export type SummaryTree = ISummaryTree | ISummaryHandle;

// @alpha
Expand Down
2 changes: 1 addition & 1 deletion common/lib/protocol-definitions/src/summary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export type SummaryObject = ISummaryTree | ISummaryBlob | ISummaryHandle | ISumm

/**
* The root of the summary tree.
* @internal
* @alpha
*/
export type SummaryTree = ISummaryTree | ISummaryHandle;

Expand Down
2 changes: 1 addition & 1 deletion packages/common/core-utils/api-report/core-utils.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function assert(condition: boolean, message: string | number): asserts co
// @internal
export const compareArrays: <T>(left: readonly T[], right: readonly T[], comparator?: (leftItem: T, rightItem: T, index: number) => boolean) => boolean;

// @internal
// @alpha
export class Deferred<T> {
constructor();
get isCompleted(): boolean;
Expand Down
2 changes: 1 addition & 1 deletion packages/common/core-utils/src/promises.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

/**
* A deferred creates a promise and the ability to resolve or reject it
* @internal
* @alpha
*/
export class Deferred<T> {
private readonly p: Promise<T>;
Expand Down
54 changes: 27 additions & 27 deletions packages/dds/map/api-report/map.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
import { ITelemetryContext } from '@fluidframework/runtime-definitions';
import { SharedObject } from '@fluidframework/shared-object-base';

// @internal @sealed
// @alpha @sealed
export class DirectoryFactory implements IChannelFactory {
// (undocumented)
static readonly Attributes: IChannelAttributes;
Expand All @@ -38,13 +38,13 @@ export class DirectoryFactory implements IChannelFactory {
get type(): string;
}

// @internal
// @alpha
export interface ICreateInfo {
ccIds: string[];
csn: number;
}

// @internal
// @alpha
export interface IDirectory extends Map<string, any>, IEventProvider<IDirectoryEvents>, Partial<IDisposable> {
readonly absolutePath: string;
countSubDirectory?(): number;
Expand All @@ -58,20 +58,20 @@ export interface IDirectory extends Map<string, any>, IEventProvider<IDirectoryE
subdirectories(): IterableIterator<[string, IDirectory]>;
}

// @internal
// @alpha
export interface IDirectoryClearOperation {
path: string;
type: "clear";
}

// @internal
// @alpha
export interface IDirectoryCreateSubDirectoryOperation {
path: string;
subdirName: string;
type: "createSubDirectory";
}

// @internal
// @alpha
export interface IDirectoryDataObject {
ci?: ICreateInfo;
storage?: {
Expand All @@ -82,21 +82,21 @@ export interface IDirectoryDataObject {
};
}

// @internal
// @alpha
export interface IDirectoryDeleteOperation {
key: string;
path: string;
type: "delete";
}

// @internal
// @alpha
export interface IDirectoryDeleteSubDirectoryOperation {
path: string;
subdirName: string;
type: "deleteSubDirectory";
}

// @internal
// @alpha
export interface IDirectoryEvents extends IEvent {
(event: "containedValueChanged", listener: (changed: IValueChanged, local: boolean, target: IEventThisPlaceHolder) => void): any;
(event: "subDirectoryCreated", listener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void): any;
Expand All @@ -105,7 +105,7 @@ export interface IDirectoryEvents extends IEvent {
(event: "undisposed", listener: (target: IEventThisPlaceHolder) => void): any;
}

// @internal
// @alpha
export type IDirectoryKeyOperation = IDirectorySetOperation | IDirectoryDeleteOperation;

// @internal
Expand All @@ -114,89 +114,89 @@ export interface IDirectoryNewStorageFormat {
content: IDirectoryDataObject;
}

// @internal
// @alpha
export type IDirectoryOperation = IDirectoryStorageOperation | IDirectorySubDirectoryOperation;

// @internal
// @alpha
export interface IDirectorySetOperation {
key: string;
path: string;
type: "set";
value: ISerializableValue;
}

// @internal
// @alpha
export type IDirectoryStorageOperation = IDirectoryKeyOperation | IDirectoryClearOperation;

// @internal
// @alpha
export type IDirectorySubDirectoryOperation = IDirectoryCreateSubDirectoryOperation | IDirectoryDeleteSubDirectoryOperation;

// @internal
// @alpha
export interface IDirectoryValueChanged extends IValueChanged {
path: string;
}

// @internal
// @alpha
export interface ILocalValue {
makeSerialized(serializer: IFluidSerializer, bind: IFluidHandle): ISerializedValue;
readonly type: string;
readonly value: any;
}

// @internal @deprecated
// @alpha @deprecated
export interface ISerializableValue {
type: string;
value: any;
}

// @internal
// @alpha
export interface ISerializedValue {
type: string;
value: string | undefined;
}

// @internal
// @alpha
export interface ISharedDirectory extends ISharedObject<ISharedDirectoryEvents & IDirectoryEvents>, Omit<IDirectory, "on" | "once" | "off"> {
// (undocumented)
[Symbol.iterator](): IterableIterator<[string, any]>;
// (undocumented)
readonly [Symbol.toStringTag]: string;
}

// @internal
// @alpha
export interface ISharedDirectoryEvents extends ISharedObjectEvents {
(event: "valueChanged", listener: (changed: IDirectoryValueChanged, local: boolean, target: IEventThisPlaceHolder) => void): any;
(event: "clear", listener: (local: boolean, target: IEventThisPlaceHolder) => void): any;
(event: "subDirectoryCreated", listener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void): any;
(event: "subDirectoryDeleted", listener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void): any;
}

// @internal
// @alpha
export interface ISharedMap extends ISharedObject<ISharedMapEvents>, Map<string, any> {
get<T = any>(key: string): T | undefined;
set<T = unknown>(key: string, value: T): this;
}

// @internal
// @alpha
export interface ISharedMapEvents extends ISharedObjectEvents {
(event: "valueChanged", listener: (changed: IValueChanged, local: boolean, target: IEventThisPlaceHolder) => void): any;
(event: "clear", listener: (local: boolean, target: IEventThisPlaceHolder) => void): any;
}

// @internal
// @alpha
export interface IValueChanged {
key: string;
previousValue: any;
}

// @internal
// @alpha
export class LocalValueMaker {
constructor(serializer: IFluidSerializer);
fromInMemory(value: unknown): ILocalValue;
fromSerializable(serializable: ISerializableValue): ILocalValue;
}

// @internal @sealed
// @alpha @sealed
export class MapFactory implements IChannelFactory {
// (undocumented)
static readonly Attributes: IChannelAttributes;
Expand All @@ -212,7 +212,7 @@ export class MapFactory implements IChannelFactory {
get type(): string;
}

// @internal @sealed
// @alpha @sealed
export class SharedDirectory extends SharedObject<ISharedDirectoryEvents> implements ISharedDirectory {
[Symbol.iterator](): IterableIterator<[string, any]>;
[Symbol.toStringTag]: string;
Expand Down Expand Up @@ -261,7 +261,7 @@ export class SharedDirectory extends SharedObject<ISharedDirectoryEvents> implem
values(): IterableIterator<any>;
}

// @internal
// @alpha
export class SharedMap extends SharedObject<ISharedMapEvents> implements ISharedMap {
[Symbol.iterator](): IterableIterator<[string, any]>;
readonly [Symbol.toStringTag]: string;
Expand Down
26 changes: 13 additions & 13 deletions packages/dds/map/src/directory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ interface IDirectoryMessageHandler {

/**
* Operation indicating a value should be set for a key.
* @internal
* @alpha
*/
export interface IDirectorySetOperation {
/**
Expand All @@ -98,7 +98,7 @@ export interface IDirectorySetOperation {

/**
* Operation indicating a key should be deleted from the directory.
* @internal
* @alpha
*/
export interface IDirectoryDeleteOperation {
/**
Expand All @@ -119,13 +119,13 @@ export interface IDirectoryDeleteOperation {

/**
* An operation on a specific key within a directory.
* @internal
* @alpha
*/
export type IDirectoryKeyOperation = IDirectorySetOperation | IDirectoryDeleteOperation;

/**
* Operation indicating the directory should be cleared.
* @internal
* @alpha
*/
export interface IDirectoryClearOperation {
/**
Expand All @@ -141,13 +141,13 @@ export interface IDirectoryClearOperation {

/**
* An operation on one or more of the keys within a directory.
* @internal
* @alpha
*/
export type IDirectoryStorageOperation = IDirectoryKeyOperation | IDirectoryClearOperation;

/**
* Operation indicating a subdirectory should be created.
* @internal
* @alpha
*/
export interface IDirectoryCreateSubDirectoryOperation {
/**
Expand All @@ -168,7 +168,7 @@ export interface IDirectoryCreateSubDirectoryOperation {

/**
* Operation indicating a subdirectory should be deleted.
* @internal
* @alpha
*/
export interface IDirectoryDeleteSubDirectoryOperation {
/**
Expand All @@ -189,21 +189,21 @@ export interface IDirectoryDeleteSubDirectoryOperation {

/**
* An operation on the subdirectories within a directory.
* @internal
* @alpha
*/
export type IDirectorySubDirectoryOperation =
| IDirectoryCreateSubDirectoryOperation
| IDirectoryDeleteSubDirectoryOperation;

/**
* Any operation on a directory.
* @internal
* @alpha
*/
export type IDirectoryOperation = IDirectoryStorageOperation | IDirectorySubDirectoryOperation;

/**
* Create info for the subdirectory.
* @internal
* @alpha
*/
export interface ICreateInfo {
/**
Expand All @@ -224,7 +224,7 @@ export interface ICreateInfo {
* {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify
* | JSON.stringify}, direct result from
* {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse | JSON.parse}.
* @internal
* @alpha
*/
export interface IDirectoryDataObject {
/**
Expand Down Expand Up @@ -269,7 +269,7 @@ export interface IDirectoryNewStorageFormat {
* {@link @fluidframework/datastore-definitions#IChannelFactory} for {@link SharedDirectory}.
*
* @sealed
* @internal
* @alpha
*/
export class DirectoryFactory implements IChannelFactory {
/**
Expand Down Expand Up @@ -447,7 +447,7 @@ class DirectoryCreationTracker {
* ```
*
* @sealed
* @internal
* @alpha
*/
export class SharedDirectory
extends SharedObject<ISharedDirectoryEvents>
Expand Down
Loading

0 comments on commit b83d208

Please sign in to comment.