File tree 2 files changed +3
-3
lines changed 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -41,10 +41,10 @@ You can generate schema types for your own workspace with [@ftrack/ts-schema-gen
41
41
Once generated, you can integrate them with @ftrack/api by passing them as a type variable:
42
42
43
43
``` ts
44
- import SchemaTypes from " ./__generated__/schema.ts" ;
44
+ import { EntityTypeMap } from " ./__generated__/schema.ts" ;
45
45
import { Session } from " @ftrack/api" ;
46
46
47
- const session = new Session <SchemaTypes >(... );
47
+ const session = new Session <EntityTypeMap >(... );
48
48
49
49
// user will now be of type User
50
50
// and provide all available properties for its entity type.
Original file line number Diff line number Diff line change @@ -594,7 +594,7 @@ export class Session<
594
594
* This is cached after the first call, and assumes that the schemas will not change during the session.
595
595
* @returns Promise with the API schemas for the session.
596
596
*/
597
- async getSchemas ( ) : Promise < Schema < TEntityTypeMap [ keyof TEntityTypeMap ] > [ ] > {
597
+ async getSchemas ( ) : Promise < Schema < TEntityTypeMap > [ ] > {
598
598
if ( ! this . schemasPromise ) {
599
599
this . schemasPromise = this . call < QuerySchemasResponse < TEntityTypeMap > > ( [
600
600
{ action : "query_schemas" } ,
You can’t perform that action at this time.
0 commit comments