Skip to content

Commit

Permalink
Fix compilation errors
Browse files Browse the repository at this point in the history
  • Loading branch information
lordofthelake committed Jan 22, 2020
1 parent 0dbd5b0 commit 12dd68c
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
11 changes: 9 additions & 2 deletions src/index.node.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
import { default as _render } from './render';
import { default as _renderToJSON } from './renderToJSON';
import { makeSymbol as _makeSymbol } from './symbol';
import { SketchLayer, WrappedSketchLayer, PlatformBridge } from './types';
import { makeSymbol as _makeSymbol, SymbolMasterProps } from './symbol';
import {
SketchLayer,
WrappedSketchLayer,
PlatformBridge,
SketchDocumentData,
WrappedSketchDocument,
SketchDocument,
} from './types';
import { FileFormat1 as FileFormat } from '@sketch-hq/sketch-file-format-ts';
import { default as _TextStyles } from './sharedStyles/TextStyles';

Expand Down
11 changes: 9 additions & 2 deletions src/index.sketch.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
import { default as _render } from './render';
import { default as _renderToJSON } from './renderToJSON';
import { makeSymbol as _makeSymbol } from './symbol';
import { SketchLayer, WrappedSketchLayer, PlatformBridge } from './types';
import { makeSymbol as _makeSymbol, SymbolMasterProps } from './symbol';
import {
SketchLayer,
WrappedSketchLayer,
PlatformBridge,
SketchDocumentData,
WrappedSketchDocument,
SketchDocument,
} from './types';
import { FileFormat1 as FileFormat } from '@sketch-hq/sketch-file-format-ts';
import { default as _TextStyles } from './sharedStyles/TextStyles';
import SketchBridge from './platformBridges/SketchBridge';
Expand Down
2 changes: 1 addition & 1 deletion src/renderers/TextRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default class TextRenderer extends SketchRenderer {
this.platformBridge,
);

const resolvedTextStyle = TextStyles.resolve(textStyle);
const resolvedTextStyle = TextStyles(() => this.platformBridge).resolve(textStyle);
if (resolvedTextStyle) {
if (!layer.style) {
layer.style = resolvedTextStyle.sketchStyle;
Expand Down
2 changes: 1 addition & 1 deletion src/symbol.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export type SymbolMasterProps = PropTypes.InferProps<typeof SymbolMasterPropType
export const makeSymbol = async (
Component: React.ComponentType<any>,
symbolProps: string | SymbolMasterProps,
document?: SketchDocumentData | SketchDocument | WrappedSketchDocument,
document: SketchDocumentData | SketchDocument | WrappedSketchDocument | null,
bridge: PlatformBridge,
) => {
if (!hasInitialized && isRunningInSketch()) {
Expand Down

0 comments on commit 12dd68c

Please sign in to comment.