diff --git a/packages/dev/src/state/shapes/draw.tsx b/packages/dev/src/state/shapes/draw.tsx index f4d5e82..cf77a5b 100644 --- a/packages/dev/src/state/shapes/draw.tsx +++ b/packages/dev/src/state/shapes/draw.tsx @@ -13,7 +13,7 @@ import { import { Vec } from '@tldraw/vec' import { getStroke } from 'perfect-freehand' import type { DrawShape } from '../../types' -import { EASINGS } from 'state/easings' +import { EASINGS } from '../easings' type T = DrawShape type E = SVGSVGElement diff --git a/packages/dev/src/state/state.ts b/packages/dev/src/state/state.ts index 76c5de8..9badcee 100644 --- a/packages/dev/src/state/state.ts +++ b/packages/dev/src/state/state.ts @@ -1,5 +1,4 @@ import * as React from 'react' -import type { Doc, DrawShape, DrawStyles, State } from 'types' import { TLPinchEventHandler, TLPointerEventHandler, @@ -14,6 +13,7 @@ import sample from './sample.json' import type { StateSelector } from 'zustand' import { copyTextToClipboard, pointInPolygon } from './utils' import { EASING_STRINGS } from './easings' +import { Doc, DrawShape, DrawStyles, State } from '../types' export const shapeUtils: TLShapeUtilsMap = { draw: new DrawUtil(), diff --git a/packages/dev/tsconfig.json b/packages/dev/tsconfig.json index 0449f54..ea6a2bb 100644 --- a/packages/dev/tsconfig.json +++ b/packages/dev/tsconfig.json @@ -4,5 +4,10 @@ "exclude": ["node_modules", "**/*.test.ts", "**/*.spec.ts", "dist"], "compilerOptions": { "baseUrl": "./src" - } + }, + "references": [ + { + "path": "../perfect-freehand" + } + ] } diff --git a/tsconfig.base.json b/tsconfig.base.json index 0fb2321..302417e 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -1,31 +1,35 @@ { + "$schema": "https://json.schemastore.org/tsconfig", + "display": "Default", "compilerOptions": { - "allowSyntheticDefaultImports": true, + "composite": true, "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "allowSyntheticDefaultImports": true, "esModuleInterop": true, - "experimentalDecorators": true, "forceConsistentCasingInFileNames": true, - "importsNotUsedAsValues": "error", - "incremental": true, - "resolveJsonModule": true, "importHelpers": true, + "resolveJsonModule": true, + "incremental": true, + "jsx": "react-jsx", + "lib": ["dom", "DOM.Iterable", "esnext"], + "experimentalDecorators": true, + "module": "esnext", + "target": "esnext", "moduleResolution": "node", - "noEmit": false, - "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. */, + "noFallthroughCasesInSwitch": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noUnusedLocals": false, + "noUnusedParameters": false, "skipLibCheck": true, - "sourceMap": true, - "strict": false, - "strictFunctionTypes": true /* Enable strict checking of function types. */, - "strictNullChecks": true /* Enable strict null checks. */, - "target": "es5", - "typeRoots": ["node_modules/@types", "node_modules/jest"], - "types": ["node", "jest"], - "jsx": "preserve", - "lib": ["dom", "esnext"], - "module": "esnext" - } + "strict": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "useDefineForClassFields": true, + "noImplicitOverride": false, + "types": ["node", "@types/jest"] + }, + "exclude": ["node_modules"] } diff --git a/tsconfig.json b/tsconfig.json index 31d9a4e..a7b9932 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,10 +2,6 @@ "extends": "./tsconfig.base.json", "exclude": ["node_modules", "**/*.test.ts", "**/*.spec.ts"], "compilerOptions": { - "baseUrl": ".", - "paths": { - "perfect-freehand": ["./packages/perfect-freehand/dist"], - "+*": ["./packages/perfect-freehand/src/*"] - } + "baseUrl": "." } }