feat(fulfillment): Events management (#6730)
**What** This pr includes some cleanup and refactoring around the abstract event emitter method for the module service to not rely on a named class property but instead on resolution naming. Includes fulfillment set events on creation. The idea is that if that pr allows us to align and agreed on the approach as well as including the cleanup for other pr to use, If this gets merged I ll continue with another pr to do the rest of the event management partially fix CORE-1735
This commit is contained in:
@@ -531,3 +531,17 @@ export type Pluralize<Singular extends string> = Singular extends `${infer R}y`
|
||||
| `${infer R}o`
|
||||
? `${Singular}es`
|
||||
: `${Singular}s`
|
||||
|
||||
export type SnakeCase<S extends string> =
|
||||
S extends `${infer T}${infer U}${infer V}`
|
||||
? U extends Uppercase<U>
|
||||
? `${Lowercase<T>}_${SnakeCase<`${Lowercase<U>}${V}`>}`
|
||||
: `${T}${SnakeCase<`${U}${V}`>}`
|
||||
: S
|
||||
|
||||
export type KebabCase<S extends string> =
|
||||
S extends `${infer T}${infer U}${infer V}`
|
||||
? U extends Uppercase<U>
|
||||
? `${Lowercase<T>}-${KebabCase<`${Lowercase<U>}${V}`>}`
|
||||
: `${T}${KebabCase<`${U}${V}`>}`
|
||||
: S
|
||||
|
||||
Reference in New Issue
Block a user