Skip to content

Commit 5770e00

Browse files
committed
Shorten types import
1 parent a74a8a3 commit 5770e00

23 files changed

+26
-26
lines changed

eslint.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ const config = tsEslint.config([
144144
},
145145
},
146146
{
147-
files: ['**/*.ts', '**/*.tsx'],
147+
files: ['**/*.ts', '**/*.[cm]ts', '**/*.tsx'],
148148

149149
extends: tsEslint.configs.strictTypeChecked,
150150

node_package/src/Authenticity.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { AuthenticityHeaders } from './types/index.ts';
1+
import type { AuthenticityHeaders } from './_types.ts';
22

33
export default {
44
authenticityToken(): string | null {

node_package/src/CallbackRegistry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ItemRegistrationCallback } from './types/index.ts';
1+
import { ItemRegistrationCallback } from './_types.ts';
22
import { onPageLoaded, onPageUnloaded } from './pageLifecycle.ts';
33
import { getContextAndRailsContext } from './context.ts';
44

node_package/src/ClientSideRenderer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import * as ReactDOM from 'react-dom';
55
import type { ReactElement } from 'react';
6-
import type { RailsContext, RegisteredComponent, RenderFunction, Root } from './types/index.ts';
6+
import type { RailsContext, RegisteredComponent, RenderFunction, Root } from './_types.ts';
77

88
import { getContextAndRailsContext, resetContextAndRailsContext, type Context } from './context.ts';
99
import createReactOutput from './createReactOutput.ts';

node_package/src/ComponentRegistry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { type RegisteredComponent, type ReactComponentOrRenderFunction } from './types/index.ts';
1+
import { type RegisteredComponent, type ReactComponentOrRenderFunction } from './_types.ts';
22
import isRenderFunction from './isRenderFunction.ts';
33
import CallbackRegistry from './CallbackRegistry.ts';
44

node_package/src/RSCClientRoot.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import * as ReactDOMClient from 'react-dom/client';
55
import { createFromReadableStream } from 'react-on-rails-rsc/client';
66
import { fetch } from './utils.ts';
77
import transformRSCStreamAndReplayConsoleLogs from './transformRSCStreamAndReplayConsoleLogs.ts';
8-
import { RailsContext, RenderFunction } from './types/index.ts';
8+
import { RailsContext, RenderFunction } from './_types.ts';
99

1010
const { use } = React;
1111

node_package/src/ReactOnRails.client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import type {
1616
Store,
1717
StoreGenerator,
1818
ReactOnRailsOptions,
19-
} from './types/index.ts';
19+
} from './_types.ts';
2020
import reactHydrateOrRender from './reactHydrateOrRender.ts';
2121

2222
const ctx = context();
@@ -203,5 +203,5 @@ ctx.ReactOnRails.resetOptions();
203203

204204
ClientStartup.clientStartup(ctx);
205205

206-
export * from './types/index.ts';
206+
export * from './_types.ts';
207207
export default ctx.ReactOnRails;

node_package/src/ReactOnRails.full.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import handleError from './handleError.ts';
22
import serverRenderReactComponent from './serverRenderReactComponent.ts';
3-
import type { RenderParams, RenderResult, ErrorOptions } from './types/index.ts';
3+
import type { RenderParams, RenderResult, ErrorOptions } from './_types.ts';
44

55
import Client from './ReactOnRails.client.ts';
66

@@ -15,5 +15,5 @@ Client.handleError = (options: ErrorOptions): string | undefined => handleError(
1515
Client.serverRenderReactComponent = (options: RenderParams): null | string | Promise<RenderResult> =>
1616
serverRenderReactComponent(options);
1717

18-
export * from './types/index.ts';
18+
export * from './_types.ts';
1919
export default Client;

node_package/src/ReactOnRailsRSC.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { renderToPipeableStream } from 'react-on-rails-rsc/server.node';
22
import { PassThrough, Readable } from 'stream';
33
import type { ReactElement } from 'react';
44

5-
import { RSCRenderParams, StreamRenderState } from './types/index.ts';
5+
import { RSCRenderParams, StreamRenderState } from './_types.ts';
66
import ReactOnRails from './ReactOnRails.full.ts';
77
import buildConsoleReplay from './buildConsoleReplay.ts';
88
import handleError from './handleError.ts';
@@ -65,5 +65,5 @@ ReactOnRails.serverRenderRSCReactComponent = (options: RSCRenderParams) => {
6565
}
6666
};
6767

68-
export * from './types/index.ts';
68+
export * from './_types.ts';
6969
export default ReactOnRails;

node_package/src/StoreRegistry.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import CallbackRegistry from './CallbackRegistry';
2-
import type { Store, StoreGenerator } from './types/index.ts';
1+
import CallbackRegistry from './CallbackRegistry.ts';
2+
import type { Store, StoreGenerator } from './_types.ts';
33

44
const storeGeneratorRegistry = new CallbackRegistry<StoreGenerator>('store generator');
55
const hydratedStoreRegistry = new CallbackRegistry<Store>('hydrated store');

0 commit comments

Comments
 (0)