From 80663e04236308aac8014818da093b4808ae28ce Mon Sep 17 00:00:00 2001 From: Steve Ruiz Date: Sat, 9 Mar 2024 20:51:02 +0000 Subject: [PATCH] Revert "small changes to dev" This reverts commit 8a361fae5c99e0f4d26dc5a43a3b7580fd503cf3. --- packages/dev/src/state/shapes/draw.tsx | 2 +- packages/dev/src/state/state.ts | 2 +- packages/dev/tsconfig.json | 7 +--- tsconfig.base.json | 48 ++++++++++++-------------- tsconfig.json | 6 +++- 5 files changed, 30 insertions(+), 35 deletions(-) diff --git a/packages/dev/src/state/shapes/draw.tsx b/packages/dev/src/state/shapes/draw.tsx index cf77a5b..f4d5e82 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 '../easings' +import { EASINGS } from 'state/easings' type T = DrawShape type E = SVGSVGElement diff --git a/packages/dev/src/state/state.ts b/packages/dev/src/state/state.ts index 9badcee..76c5de8 100644 --- a/packages/dev/src/state/state.ts +++ b/packages/dev/src/state/state.ts @@ -1,4 +1,5 @@ import * as React from 'react' +import type { Doc, DrawShape, DrawStyles, State } from 'types' import { TLPinchEventHandler, TLPointerEventHandler, @@ -13,7 +14,6 @@ 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 ea6a2bb..0449f54 100644 --- a/packages/dev/tsconfig.json +++ b/packages/dev/tsconfig.json @@ -4,10 +4,5 @@ "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 302417e..0fb2321 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -1,35 +1,31 @@ { - "$schema": "https://json.schemastore.org/tsconfig", - "display": "Default", "compilerOptions": { - "composite": true, - "declaration": true, - "declarationMap": true, - "emitDeclarationOnly": true, "allowSyntheticDefaultImports": true, + "declaration": true, "esModuleInterop": true, + "experimentalDecorators": true, "forceConsistentCasingInFileNames": true, - "importHelpers": true, - "resolveJsonModule": true, + "importsNotUsedAsValues": "error", "incremental": true, - "jsx": "react-jsx", - "lib": ["dom", "DOM.Iterable", "esnext"], - "experimentalDecorators": true, - "module": "esnext", - "target": "esnext", + "resolveJsonModule": true, + "importHelpers": true, "moduleResolution": "node", - "noFallthroughCasesInSwitch": true, - "noImplicitAny": true, - "noImplicitReturns": true, - "noUnusedLocals": false, - "noUnusedParameters": false, + "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. */, "skipLibCheck": true, - "strict": true, - "strictFunctionTypes": true, - "strictNullChecks": true, - "useDefineForClassFields": true, - "noImplicitOverride": false, - "types": ["node", "@types/jest"] - }, - "exclude": ["node_modules"] + "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" + } } diff --git a/tsconfig.json b/tsconfig.json index a7b9932..31d9a4e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,6 +2,10 @@ "extends": "./tsconfig.base.json", "exclude": ["node_modules", "**/*.test.ts", "**/*.spec.ts"], "compilerOptions": { - "baseUrl": "." + "baseUrl": ".", + "paths": { + "perfect-freehand": ["./packages/perfect-freehand/dist"], + "+*": ["./packages/perfect-freehand/src/*"] + } } }