(
blockId: string,
blockView: string,
nodeModel: BlockNodeModel,
tabModel: TabModel,
waveEnv: WaveEnv
)
| 49 | } |
| 50 | |
| 51 | function makeViewModel( |
| 52 | blockId: string, |
| 53 | blockView: string, |
| 54 | nodeModel: BlockNodeModel, |
| 55 | tabModel: TabModel, |
| 56 | waveEnv: WaveEnv |
| 57 | ): ViewModel { |
| 58 | const ctor = BlockRegistry.get(blockView); |
| 59 | if (ctor != null) { |
| 60 | return new ctor({ blockId, nodeModel, tabModel, waveEnv }); |
| 61 | } |
| 62 | return makeDefaultViewModel(blockView); |
| 63 | } |
| 64 | |
| 65 | export { makeViewModel }; |
no test coverage detected