Skip to content

Commit 3e6d9a2

Browse files
committed
refactor: use default exports
1 parent cd169ca commit 3e6d9a2

26 files changed

+49
-46
lines changed

packages/webshell/src/Feature.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export interface FeatureClass<
3030
*
3131
* @public
3232
*/
33-
export abstract class Feature<
33+
export default abstract class Feature<
3434
O extends {} = {},
3535
P extends PropsSpecs<any, any> = {},
3636
W extends WebHandlersSpecs<any> = {}

packages/webshell/src/FeatureBuilder.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable no-spaced-func */
2-
import { Feature } from './Feature';
2+
import Feature from './Feature';
33
import type { FeatureClass } from './Feature';
44
import type {
55
FeatureDefinition,
@@ -37,7 +37,7 @@ export interface FeatureBuilderConfig<O extends {}>
3737
*
3838
* @public
3939
*/
40-
export class FeatureBuilder<
40+
export default class FeatureBuilder<
4141
O extends {} = {},
4242
S extends PropsSpecs<any, any> = {},
4343
W extends WebHandlersSpecs<any> = {}

packages/webshell/src/FeatureRegistry.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { Feature } from './Feature';
2-
import { Reporter } from './Reporter';
1+
import Feature from './Feature';
2+
import Reporter from './Reporter';
33
import { PropDefinition, PropsSpecs, WebshellProps } from './types';
44

55
function extractFeatureProps(
@@ -68,7 +68,7 @@ function extractPropsSpecsMap(
6868
}, {}) as Record<string, PropDefinition<any, any>>;
6969
}
7070

71-
export class FeatureRegistry<F extends Feature<any, any, any>[]> {
71+
export default class FeatureRegistry<F extends Feature<any, any, any>[]> {
7272
readonly propsMap: Record<string, PropDefinition<any, any>>;
7373
readonly handlersMap: Record<string, PropDefinition<any, any>>;
7474
readonly features: F;

packages/webshell/src/Reporter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ const codes: Record<ErrorCode, ErrorDefinition<ErrorCode>> = {
6767
}
6868
};
6969

70-
export class Reporter {
70+
export default class Reporter {
7171
private readonly webshellDebug: boolean;
7272
private readonly strict: boolean;
7373
constructor(webshellDebug: boolean, strict: boolean) {

packages/webshell/src/__tests__/FeatureRegistry.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { FeatureRegistry } from '../FeatureRegistry';
2-
import { FeatureBuilder } from '../FeatureBuilder';
3-
import { Reporter } from '../Reporter';
1+
import FeatureRegistry from '../FeatureRegistry';
2+
import FeatureBuilder from '../FeatureBuilder';
3+
import Reporter from '../Reporter';
44

55
function buildFeature(id: string) {
66
return new FeatureBuilder({

packages/webshell/src/__tests__/WebFeaturesLoader.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import Ersatz from '@formidable-webview/ersatz';
44
import { waitForErsatz } from '@formidable-webview/ersatz-testing';
55
import { render } from '@testing-library/react-native';
66
import dummyHelloScript from './feat/DummyHello.webjs';
7-
import { FeatureBuilder } from '../FeatureBuilder';
7+
import FeatureBuilder from '../FeatureBuilder';
88
import { WebFeaturesLoader } from '../web/WebFeaturesLoader';
99

1010
const HelloFeature = new FeatureBuilder({

packages/webshell/src/__tests__/make-webshell.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import dummyFailingScript from './feat/DummyFailing.webjs';
1111
import dummyOptionScript from './feat/DummyOption.webjs';
1212
import dummyHandleridScript from './feat/DummyHandlerid.webjs';
1313
import dummyReceiverScript from './feat/DummyReceiver.webjs';
14-
import { makeWebshell } from '../make-webshell';
15-
import { FeatureBuilder } from '../FeatureBuilder';
14+
import makeWebshell from '../makeWebshell';
15+
import FeatureBuilder from '../FeatureBuilder';
1616
import {
1717
MinimalWebViewProps,
1818
WebHandle,

packages/webshell/src/features/ForceElementSizeFeature.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import script from './ForceElementSizeFeature.webjs';
2-
import { FeatureBuilder } from '../FeatureBuilder';
2+
import FeatureBuilder from '../FeatureBuilder';
33
import type { DOMElementRequest } from '../types';
44
import type { FeatureClass } from '../Feature';
55

packages/webshell/src/features/ForceResponsiveViewportFeature.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import script from './ForceResponsiveViewportFeature.webjs';
2-
import { FeatureBuilder } from '../FeatureBuilder';
2+
import FeatureBuilder from '../FeatureBuilder';
33
import type { FeatureClass } from '../Feature';
44

55
/**

packages/webshell/src/features/HandleElementCSSBoxFeature.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import script from './HandleElementCSSBoxFeature.webjs';
2-
import { FeatureBuilder } from '../FeatureBuilder';
2+
import FeatureBuilder from '../FeatureBuilder';
33
import type { DOMElementRequest, DOMRectSize, PropDefinition } from '../types';
44
import type { FeatureClass } from '../Feature';
55

0 commit comments

Comments
 (0)