SUI-Components / sui

Monorepo for SUI (Simple User Interface) packages.
169 stars 33 forks source link

feat(packages/sui-domain): adapt entry point factory to be able to wo… #1764

Closed AgonisticKatai closed 3 months ago

AgonisticKatai commented 3 months ago

According to the new domain agreements, use cases must be exported in a named way by means of a constant called factory that will be responsible for giving access to the create method of the use case.

Description

This change must maintain backward compatibility with the current entry point behavior.

Related Issue

N/A

Example

class GetMovieDetailsUseCase extends UseCase {
  /* ... */
  static create({config}) {
    return new GetMovieDetailsUseCase({repository: MovieRepository.create({config})})
  }
}

export const factory = GetMovieDetailsUseCase.create