Skip to content

Commit

Permalink
fix: TS type exports
Browse files Browse the repository at this point in the history
  • Loading branch information
Undistraction committed Aug 1, 2024
1 parent 4da3186 commit a986e32
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 21 deletions.
16 changes: 0 additions & 16 deletions src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,6 @@ const interpolatePointOnCurveDefault = interpolatePointOnCurveEvenlySpaced({
precision: PRECISION_DEFAULT,
})

// -----------------------------------------------------------------------------
// Re-export Interpolation functions
// -----------------------------------------------------------------------------

export {
interpolateCurveU,
interpolateCurveV,
} from './interpolate/curves/curved'
export {
interpolateStraightLineU,
interpolateStraightLineV,
} from './interpolate/curves/straight'

export { interpolatePointOnCurveEvenlySpaced } from './interpolate/pointOnCurve/even'
export { interpolatePointOnCurveLinear } from './interpolate/pointOnCurve/linear'

// -----------------------------------------------------------------------------
// Export Main API
// -----------------------------------------------------------------------------
Expand Down
18 changes: 17 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,23 @@
export * from './types'

// -----------------------------------------------------------------------------
// Exports
// Re-export Interpolation functions
// -----------------------------------------------------------------------------

export {
interpolateCurveU,
interpolateCurveV,
} from './interpolate/curves/curved'
export {
interpolateStraightLineU,
interpolateStraightLineV,
} from './interpolate/curves/straight'

export { interpolatePointOnCurveEvenlySpaced } from './interpolate/pointOnCurve/even'
export { interpolatePointOnCurveLinear } from './interpolate/pointOnCurve/linear'

// -----------------------------------------------------------------------------
// Re-export API
// -----------------------------------------------------------------------------

export * from './api'
9 changes: 6 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
{
"include": ["src/**/*"],
"compilerOptions": {
"module": "preserve",
"moduleResolution": "bundler",
// Enable all strict type-checking options
"strict": true,
"module": "preserve", // try esnext
"moduleResolution": "bundler", // For Vite
"target": "ES2020",
"sourceMap": true,
"outDir": "./dist",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true,
"useUnknownInCatchVariables": false,
"typeRoots": ["./src/@types", "./node_modules/@types"],
"declaration": true,

// Directory containing the generated declaration files
"declarationDir": "./dist"
}
}
2 changes: 1 addition & 1 deletion vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default defineConfig(() => {
plugins: [
// Generate a single types file for all our types
dts({
rollupTypes: true,
// rollupTypes: true,
}),
],
}
Expand Down

0 comments on commit a986e32

Please sign in to comment.