Skip to content

Commit 12dd68c

Browse files
committed
Fix compilation errors
1 parent 0dbd5b0 commit 12dd68c

File tree

4 files changed

+20
-6
lines changed

4 files changed

+20
-6
lines changed

src/index.node.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
import { default as _render } from './render';
22
import { default as _renderToJSON } from './renderToJSON';
3-
import { makeSymbol as _makeSymbol } from './symbol';
4-
import { SketchLayer, WrappedSketchLayer, PlatformBridge } from './types';
3+
import { makeSymbol as _makeSymbol, SymbolMasterProps } from './symbol';
4+
import {
5+
SketchLayer,
6+
WrappedSketchLayer,
7+
PlatformBridge,
8+
SketchDocumentData,
9+
WrappedSketchDocument,
10+
SketchDocument,
11+
} from './types';
512
import { FileFormat1 as FileFormat } from '@sketch-hq/sketch-file-format-ts';
613
import { default as _TextStyles } from './sharedStyles/TextStyles';
714

src/index.sketch.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
import { default as _render } from './render';
22
import { default as _renderToJSON } from './renderToJSON';
3-
import { makeSymbol as _makeSymbol } from './symbol';
4-
import { SketchLayer, WrappedSketchLayer, PlatformBridge } from './types';
3+
import { makeSymbol as _makeSymbol, SymbolMasterProps } from './symbol';
4+
import {
5+
SketchLayer,
6+
WrappedSketchLayer,
7+
PlatformBridge,
8+
SketchDocumentData,
9+
WrappedSketchDocument,
10+
SketchDocument,
11+
} from './types';
512
import { FileFormat1 as FileFormat } from '@sketch-hq/sketch-file-format-ts';
613
import { default as _TextStyles } from './sharedStyles/TextStyles';
714
import SketchBridge from './platformBridges/SketchBridge';

src/renderers/TextRenderer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default class TextRenderer extends SketchRenderer {
3232
this.platformBridge,
3333
);
3434

35-
const resolvedTextStyle = TextStyles.resolve(textStyle);
35+
const resolvedTextStyle = TextStyles(() => this.platformBridge).resolve(textStyle);
3636
if (resolvedTextStyle) {
3737
if (!layer.style) {
3838
layer.style = resolvedTextStyle.sketchStyle;

src/symbol.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ export type SymbolMasterProps = PropTypes.InferProps<typeof SymbolMasterPropType
154154
export const makeSymbol = async (
155155
Component: React.ComponentType<any>,
156156
symbolProps: string | SymbolMasterProps,
157-
document?: SketchDocumentData | SketchDocument | WrappedSketchDocument,
157+
document: SketchDocumentData | SketchDocument | WrappedSketchDocument | null,
158158
bridge: PlatformBridge,
159159
) => {
160160
if (!hasInitialized && isRunningInSketch()) {

0 commit comments

Comments
 (0)