Adds references
This commit is contained in:
parent
9f2148eab9
commit
7d37cf34c1
7 changed files with 37 additions and 18 deletions
|
@ -3,6 +3,7 @@
|
|||
"include": ["src"],
|
||||
"exclude": ["node_modules", "dist", "docs"],
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"emitDeclarationOnly": true,
|
||||
"rootDir": "src",
|
||||
"outDir": "./dist/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import { TLDraw, TLDrawState } from '@tldraw/tldraw'
|
||||
import { TLDraw, TLDrawShapeType, TLDrawState } from '@tldraw/tldraw'
|
||||
|
||||
export default function Editor(): JSX.Element {
|
||||
const rTLDrawState = React.useRef<TLDrawState>()
|
||||
|
@ -13,7 +13,7 @@ export default function Editor(): JSX.Element {
|
|||
state.selectAll()
|
||||
state.createShapes({
|
||||
id: 'rect1',
|
||||
type: 'rectangle',
|
||||
type: TLDrawShapeType.Rectangle,
|
||||
point: [100, 100],
|
||||
size: [200, 200],
|
||||
})
|
||||
|
|
|
@ -3,8 +3,12 @@
|
|||
"include": ["src"],
|
||||
"exclude": ["node_modules", "**/*.test.ts", "**/*.spec.ts", "dist"],
|
||||
"compilerOptions": {
|
||||
"rootDir": "src",
|
||||
"outDir": "./dist/types",
|
||||
"baseUrl": "src"
|
||||
}
|
||||
"composite": true
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"path": "../../packages/tldraw"
|
||||
},
|
||||
{ "path": "../../packages/core" }
|
||||
]
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
"include": ["src"],
|
||||
"exclude": ["node_modules", "dist", "docs"],
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"emitDeclarationOnly": true,
|
||||
"rootDir": "src",
|
||||
"outDir": "./dist/types",
|
||||
|
@ -10,5 +11,6 @@
|
|||
"paths": {
|
||||
"~*": ["./*"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"references": [{ "path": "../../packages/core" }]
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"target": "es5",
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"allowJs": true,
|
||||
|
@ -20,5 +21,11 @@
|
|||
}
|
||||
},
|
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
|
||||
"exclude": ["node_modules"]
|
||||
"exclude": ["node_modules"],
|
||||
"references": [
|
||||
{
|
||||
"path": "../../packages/tldraw"
|
||||
},
|
||||
{ "path": "../../packages/core" }
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1,31 +1,33 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"allowSyntheticDefaultImports": true,
|
||||
// For references
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"sourceMap": true,
|
||||
// Other
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"esModuleInterop": true,
|
||||
"experimentalDecorators": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"importsNotUsedAsValues": "error",
|
||||
"stripInternal": true,
|
||||
"incremental": true,
|
||||
"importHelpers": true,
|
||||
"importsNotUsedAsValues": "error",
|
||||
"incremental": true,
|
||||
"jsx": "preserve",
|
||||
"lib": ["dom", "esnext"],
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"declarationMap": true,
|
||||
"noFallthroughCasesInSwitch": true /* Report errors for fallthrough cases in switch statement. */,
|
||||
"noImplicitAny": true /* Raise error on expressions and declarations with an implied 'any' type. */,
|
||||
"noImplicitReturns": true /* Report error when not all code paths in function return a value. */,
|
||||
"noUnusedLocals": false /* Report errors on unused locals. */,
|
||||
"noUnusedParameters": false /* Report errors on unused parameters. */,
|
||||
"skipLibCheck": true,
|
||||
"sourceMap": true,
|
||||
"strict": false,
|
||||
"strictFunctionTypes": true /* Enable strict checking of function types. */,
|
||||
"strictNullChecks": true /* Enable strict null checks. */,
|
||||
"stripInternal": true,
|
||||
"target": "es6",
|
||||
"typeRoots": ["node_modules/@types", "node_modules/jest"],
|
||||
"types": ["node", "jest"],
|
||||
"jsx": "preserve",
|
||||
"lib": ["dom", "esnext"],
|
||||
"module": "esnext"
|
||||
"types": ["node", "jest"]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
{
|
||||
"composite": true,
|
||||
"extends": "./tsconfig.base.json",
|
||||
"exclude": ["node_modules", "**/*.test.ts", "**/*.spec.ts"],
|
||||
"files": [],
|
||||
"references": [{ "path": "./packages/tldraw" }, { "path": "./packages/core" }],
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
|
|
Loading…
Reference in a new issue