-
-
Notifications
You must be signed in to change notification settings - Fork 629
Migrate OSS dummy client examples to TypeScript #3606
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
92b3018
d1fef75
00a0b0f
2ecddad
0396ff4
8aa8b61
ab91379
edc4610
450de8f
898d321
a03ad5c
4cf89ba
993a34a
776098a
070b7a3
9eed7ed
f7e999e
382ee47
fcd9250
bcb40aa
9a38bde
8b8dbb3
27dbff6
78d069e
9179ccd
ff0875f
05f6d02
dd1c018
8d51bfb
5191ecf
914cbea
3214310
590b100
ac5b0a3
ca7c1d0
9719922
625e306
a31c5a5
0939331
4d69a19
744e1fa
4df938e
a969fe9
4ec40ee
4258650
b18f280
928df76
a405f34
d533427
4f0cd61
64c5daf
bcd7f12
0525f65
bb7a1c2
55261b8
431b612
86567c4
80f04e8
d61e13c
8f962aa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -12,7 +12,11 @@ | |||||
| * https://github.com/shakacode/react_on_rails/blob/master/REACT-ON-RAILS-PRO-LICENSE.md | ||||||
| */ | ||||||
|
|
||||||
| import { type RegisteredComponent, type ReactComponentOrRenderFunction } from 'react-on-rails/types'; | ||||||
| import { | ||||||
| type ReactComponentOrRenderFunction, | ||||||
| type RegisteredComponent, | ||||||
| type RegisteredComponentValue, | ||||||
| } from 'react-on-rails/types'; | ||||||
| import isRenderFunction from 'react-on-rails/isRenderFunction'; | ||||||
| import CallbackRegistry from './CallbackRegistry.ts'; | ||||||
|
|
||||||
|
|
@@ -22,7 +26,7 @@ const componentRegistry = new CallbackRegistry<RegisteredComponent>('component') | |||||
| * @param components { component1: component1, component2: component2, etc. } | ||||||
| * @public | ||||||
| */ | ||||||
| export function register(components: Record<string, ReactComponentOrRenderFunction>): void { | ||||||
| export function register(components: Record<string, RegisteredComponentValue>): void { | ||||||
| Object.keys(components).forEach((name) => { | ||||||
| const component = components[name]; | ||||||
| if (!component) { | ||||||
|
|
@@ -44,7 +48,7 @@ export function register(components: Record<string, ReactComponentOrRenderFuncti | |||||
|
|
||||||
|
justin808 marked this conversation as resolved.
|
||||||
| componentRegistry.set(name, { | ||||||
| name, | ||||||
| component, | ||||||
| component: component as ReactComponentOrRenderFunction, | ||||||
|
justin808 marked this conversation as resolved.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The If a plain-object Consider one of:
Suggested change
|
||||||
| renderFunction, | ||||||
| isRenderer, | ||||||
| }); | ||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.