diff --git a/types/react-sketchapp/index.d.ts b/types/react-sketchapp/index.d.ts index 5f950af455..f340e19232 100644 --- a/types/react-sketchapp/index.d.ts +++ b/types/react-sketchapp/index.d.ts @@ -275,3 +275,9 @@ export function makeSymbol
(
* Injects the symbols into Sketch's symbol page. **Call this before rendering.**
*/
export function injectSymbols(context: SketchContext): void;
+
+export const Platform: {
+ OS: 'sketch',
+ Version: 1,
+ select: (obj: any) => any
+};
diff --git a/types/react-sketchapp/react-sketchapp-tests.tsx b/types/react-sketchapp/react-sketchapp-tests.tsx
index 8ebb12514e..f72c80fd78 100644
--- a/types/react-sketchapp/react-sketchapp-tests.tsx
+++ b/types/react-sketchapp/react-sketchapp-tests.tsx
@@ -1,24 +1,26 @@
-import { Artboard, View, Text, StyleSheet, TextStyles, render, renderToJSON } from 'react-sketchapp';
+import {
+ Artboard, View, Text, StyleSheet, TextStyles, render, renderToJSON, Platform
+} from 'react-sketchapp';
// the styles object should be a mapped typed mapping the keys of the object literal to numbers
const styles = StyleSheet.create({
- red: {
- backgroundColor: '#FF00000'
- },
- flexRow: {
- flexDirection: 'row'
- }
+ red: {
+ backgroundColor: '#FF00000'
+ },
+ flexRow: {
+ flexDirection: 'row'
+ }
});
// style references are numbers
const styleReference = styles.red;
const Document = () =>