Skip to content

Commit

Permalink
feat: Keep comments in build (#131)
Browse files Browse the repository at this point in the history
* clamp

* keep comments in build

* style: type
  • Loading branch information
bvandercar-vt authored May 9, 2024
1 parent d829e31 commit b02f46d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 18 deletions.
8 changes: 2 additions & 6 deletions src/math.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,7 @@ export const bezierCurve = (
const max = 200
const vec = direction(start, finish)
const length = magnitude(vec)
const spread = clamp(length, min, max)
const anchors = generateBezierAnchors(
start,
finish,
overrideSpread ?? spread
)
const spread = overrideSpread ?? clamp(length, min, max)
const anchors = generateBezierAnchors(start, finish, spread)
return new Bezier(start, ...anchors, finish)
}
4 changes: 2 additions & 2 deletions src/spoof.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export interface ClickOptions extends MoveOptions {
*/
readonly waitForClick?: number
/**
* Delay after performing the click in milliseconds.
* @extends moveDelay
* @default 2000
*/
readonly moveDelay?: number
Expand All @@ -76,7 +76,7 @@ export interface PathOptions {

interface RandomMoveOptions extends Pick<MoveOptions, 'moveDelay' | 'moveSpeed'> {
/**
* Delay after performing the click in milliseconds.
* @extends moveDelay
* @default 2000
*/
readonly moveDelay?: number
Expand Down
20 changes: 10 additions & 10 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
"compilerOptions": {
/* Basic Options */
// "incremental": true, /* Enable incremental compilation */
"target": "es5" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */,
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
"target": "es5" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */,
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
"skipLibCheck": true,
"lib": ["es2015", "dom"],
"outDir": "./lib" /* Redirect output structure to the directory. */,
"rootDir": "./src" /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */,
"outDir": "./lib" /* Redirect output structure to the directory. */,
"rootDir": "./src" /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */,
"declaration": true,
// "composite": true, /* Enable project compilation */
// "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
"removeComments": true /* Do not emit comments to output. */,
"removeComments": false /* Keep comments-- want JSDocs in types */,
// "noEmit": true, /* Do not emit outputs. */
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
"downlevelIteration": true /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */,
"downlevelIteration": true /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */,
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
/* Strict Type-Checking Options */
"strict": true /* Enable all strict type-checking options. */,
"noImplicitAny": false /* Raise error on expressions and declarations with an implied 'any' type. */,
"strict": true /* Enable all strict type-checking options. */,
"noImplicitAny": false /* Raise error on expressions and declarations with an implied 'any' type. */,
// "strictNullChecks": true, /* Enable strict null checks. */
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
Expand All @@ -38,7 +38,7 @@
// "typeRoots": [], /* List of folders to include type definitions from. */
// "types": [], /* Type declaration files to be included in compilation. */
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
/* Source Map Options */
Expand All @@ -50,7 +50,7 @@
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
/* Advanced Options */
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
},
"include": ["src/**/*"],
"exclude": ["node_modules"],
Expand Down

0 comments on commit b02f46d

Please sign in to comment.