Ensuring Type Inference from Layers in TypeScript

I need some advance typescript help and I think its coming down to type variance. Basically I have this type

export interface EntryPointConfig<
  ROut,
> {
  /**
   * ROut should be inferred from requirements 
   * provided by the layers
   */
  readonly services: [Layer.Layer<ROut, any, any>];

  readonly routes: Route<ROut>[];

  /**
   * Instead they are getting inferred 
   * from the requirements of the views
   */
  readonly views: View<ROut>[];
}


How do I ensure ROut is inferred by the provided layers?
Was this page helpful?