Skip to content
Merged
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
8 changes: 4 additions & 4 deletions content/liveobjects/typing.textile
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ blang[javascript].

If you are using TypeScript in your project, you can leverage LiveObjects' built-in TypeScript support to ensure type safety and enable autocompletion when working with objects on a channel.

h2(#global). Global ObjectsTypes interface
h2(#global). Global AblyObjectsTypes interface

You can type objects on all your channels by defining a global @ObjectsTypes@ interface. If you only want to type the root object for a specific channel, see the "Typing channel.objects.getRoot()":#getroot section below.
You can type objects on all your channels by defining a global @AblyObjectsTypes@ interface. If you only want to type the root object for a specific channel, see the "Typing channel.objects.getRoot()":#getroot section below.

Define the @ObjectsTypes@ interface in a type declaration file. You can create a file named @ably.config.d.ts@ in the root of your application:
Define the @AblyObjectsTypes@ interface in a type declaration file. You can create a file named @ably.config.d.ts@ in the root of your application:

blang[javascript].

Expand All @@ -35,7 +35,7 @@ blang[javascript].
};

declare global {
export interface ObjectsTypes {
export interface AblyObjectsTypes {
root: MyCustomRoot;
}
}
Expand Down