mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 12:30:18 +00:00
Added react-native-canvas
This commit is contained in:
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
// Type definitions for react-native-canvas 0.1
|
||||
// Project: https://github.com/iddan/react-native-canvas#readme
|
||||
// Definitions by: hmajid2301 <https://github.com/hmajid2301>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
import * as React from "react";
|
||||
import { StyleProp, ViewStyle } from "react-native";
|
||||
|
||||
export interface CanvasProps {
|
||||
style: StyleProp<ViewStyle>;
|
||||
baseUrl: string;
|
||||
originWhitelist: string[];
|
||||
}
|
||||
|
||||
export default class Canvas extends React.Component<CanvasProps> {}
|
||||
export class Image extends React.Component {}
|
||||
export class ImageData extends React.Component {}
|
||||
export class Path2D extends React.Component {}
|
||||
@@ -0,0 +1,19 @@
|
||||
import * as React from "react";
|
||||
import { View } from "react-native";
|
||||
import Canvas, {
|
||||
Image as CanvasImage,
|
||||
Path2D,
|
||||
ImageData
|
||||
} from "react-native-canvas";
|
||||
|
||||
class CanvasTest extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<View>
|
||||
<Canvas ref={this.handleCanvas} />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
handleCanvas = (canvas: Canvas) => {};
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": ["es6"],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": ["../"],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"jsx": "react-native"
|
||||
},
|
||||
"files": ["index.d.ts", "react-native-canvas-tests.tsx"]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user