This repository has been archived by the owner on Jun 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update examples for upcomming version
- Loading branch information
1 parent
0d06951
commit 8a47c5a
Showing
23 changed files
with
181 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
require('./dev.broker.gen'); | ||
import './gen.broker.types'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
require('./dev.broker.gen'); | ||
import './gen.broker.types'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
examples/multiple-brokers/src/first.broker/types/events.params.assert.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import * as Services from './services.types'; | ||
import { createAssertEquals, createAssertType } from 'typescript-is'; | ||
|
||
export default { | ||
'user.nodeChange': { | ||
equals: createAssertEquals< | ||
Services.UserServiceTypes.EventParams<'nodeChange'> | ||
>(), | ||
type: createAssertType< | ||
Services.UserServiceTypes.EventParams<'nodeChange'> | ||
>(), | ||
}, | ||
}; |
9 changes: 9 additions & 0 deletions
9
examples/multiple-brokers/src/first.broker/types/events.params.schema.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import * as Services from './services.types'; | ||
import { schema } from 'ts-transformer-json-schema'; | ||
type Trim<T> = { [K in keyof T]: any }; | ||
|
||
export default { | ||
'user.nodeChange': schema< | ||
Trim<Services.UserServiceTypes.EventParams<'nodeChange'>> | ||
>(), | ||
}; |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
83 changes: 83 additions & 0 deletions
83
examples/multiple-brokers/src/second.broker/types/events.params.assert.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
import * as Services from './services.types'; | ||
import { createAssertEquals, createAssertType } from 'typescript-is'; | ||
|
||
export default { | ||
'$broker.started': { | ||
equals: createAssertEquals< | ||
Services.BrokerServiceTypes.EventParams<'started'> | ||
>(), | ||
type: createAssertType< | ||
Services.BrokerServiceTypes.EventParams<'started'> | ||
>(), | ||
}, | ||
'$circuit-breaker.opened': { | ||
equals: createAssertEquals< | ||
Services.CircuitBreakerServiceTypes.EventParams<'opened'> | ||
>(), | ||
type: createAssertType< | ||
Services.CircuitBreakerServiceTypes.EventParams<'opened'> | ||
>(), | ||
}, | ||
'$circuit-breaker.half-opened': { | ||
equals: createAssertEquals< | ||
Services.CircuitBreakerServiceTypes.EventParams<'half-opened'> | ||
>(), | ||
type: createAssertType< | ||
Services.CircuitBreakerServiceTypes.EventParams<'half-opened'> | ||
>(), | ||
}, | ||
'$circuit-breaker.closed': { | ||
equals: createAssertEquals< | ||
Services.CircuitBreakerServiceTypes.EventParams<'closed'> | ||
>(), | ||
type: createAssertType< | ||
Services.CircuitBreakerServiceTypes.EventParams<'closed'> | ||
>(), | ||
}, | ||
'$node.connected': { | ||
equals: createAssertEquals< | ||
Services.NodeServiceTypes.EventParams<'connected'> | ||
>(), | ||
type: createAssertType< | ||
Services.NodeServiceTypes.EventParams<'connected'> | ||
>(), | ||
}, | ||
'$node.updated': { | ||
equals: createAssertEquals< | ||
Services.NodeServiceTypes.EventParams<'updated'> | ||
>(), | ||
type: createAssertType<Services.NodeServiceTypes.EventParams<'updated'>>(), | ||
}, | ||
'$node.disconnected': { | ||
equals: createAssertEquals< | ||
Services.NodeServiceTypes.EventParams<'disconnected'> | ||
>(), | ||
type: createAssertType< | ||
Services.NodeServiceTypes.EventParams<'disconnected'> | ||
>(), | ||
}, | ||
'$services.changed': { | ||
equals: createAssertEquals< | ||
Services.ServicesServiceTypes.EventParams<'changed'> | ||
>(), | ||
type: createAssertType< | ||
Services.ServicesServiceTypes.EventParams<'changed'> | ||
>(), | ||
}, | ||
'$transporter.connected': { | ||
equals: createAssertEquals< | ||
Services.TransporterServiceTypes.EventParams<'connected'> | ||
>(), | ||
type: createAssertType< | ||
Services.TransporterServiceTypes.EventParams<'connected'> | ||
>(), | ||
}, | ||
'$transporter.disconnected': { | ||
equals: createAssertEquals< | ||
Services.TransporterServiceTypes.EventParams<'disconnected'> | ||
>(), | ||
type: createAssertType< | ||
Services.TransporterServiceTypes.EventParams<'disconnected'> | ||
>(), | ||
}, | ||
}; |
36 changes: 36 additions & 0 deletions
36
examples/multiple-brokers/src/second.broker/types/events.params.schema.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import * as Services from './services.types'; | ||
import { schema } from 'ts-transformer-json-schema'; | ||
type Trim<T> = { [K in keyof T]: any }; | ||
|
||
export default { | ||
'$broker.started': schema< | ||
Trim<Services.BrokerServiceTypes.EventParams<'started'>> | ||
>(), | ||
'$circuit-breaker.opened': schema< | ||
Trim<Services.CircuitBreakerServiceTypes.EventParams<'opened'>> | ||
>(), | ||
'$circuit-breaker.half-opened': schema< | ||
Trim<Services.CircuitBreakerServiceTypes.EventParams<'half-opened'>> | ||
>(), | ||
'$circuit-breaker.closed': schema< | ||
Trim<Services.CircuitBreakerServiceTypes.EventParams<'closed'>> | ||
>(), | ||
'$node.connected': schema< | ||
Trim<Services.NodeServiceTypes.EventParams<'connected'>> | ||
>(), | ||
'$node.updated': schema< | ||
Trim<Services.NodeServiceTypes.EventParams<'updated'>> | ||
>(), | ||
'$node.disconnected': schema< | ||
Trim<Services.NodeServiceTypes.EventParams<'disconnected'>> | ||
>(), | ||
'$services.changed': schema< | ||
Trim<Services.ServicesServiceTypes.EventParams<'changed'>> | ||
>(), | ||
'$transporter.connected': schema< | ||
Trim<Services.TransporterServiceTypes.EventParams<'connected'>> | ||
>(), | ||
'$transporter.disconnected': schema< | ||
Trim<Services.TransporterServiceTypes.EventParams<'disconnected'>> | ||
>(), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
require('./dev.broker.gen'); | ||
import './gen.broker.types'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters