Skip to content

Commit 6edb6fb

Browse files
committed
export AspectCalculator. fix named exports
1 parent 2d9e4aa commit 6edb6fb

File tree

7 files changed

+13
-10
lines changed

7 files changed

+13
-10
lines changed

dist/astrochart.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/project/src/aspect.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ declare class AspectCalculator {
3030
settings: Partial<Settings>;
3131
toPoints: Points;
3232
context: this;
33-
constructor(toPoints: Points, settings?: Settings);
33+
constructor(toPoints: Points, settings?: Partial<Settings>);
3434
/**
3535
* Getter for this.toPoints
3636
* @see constructor

dist/project/src/index.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
import Chart from './chart';
2+
import AspectCalculator from './aspect';
3+
import { Settings } from './settings';
4+
export { Chart, AspectCalculator, Settings };
25
export default Chart;
3-
export { Chart };

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"url": "https://github.com/AstroDraw/AstroChart.git"
1616
},
1717
"main": "./dist/astrochart.js",
18-
"types": "./dist/project/src/chart.d.ts",
18+
"types": "./dist/project/src/index.d.ts",
1919
"scripts": {
2020
"test": "jest",
2121
"test:coverage": "jest --coverage",

project/src/aspect.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class AspectCalculator {
3939
settings: Partial<Settings>
4040
toPoints: Points
4141
context: this
42-
constructor (toPoints: Points, settings?: Settings) {
42+
constructor (toPoints: Points, settings?: Partial<Settings>) {
4343
if (toPoints == null) {
4444
throw new Error('Param \'toPoint\' must not be empty.')
4545
}

project/src/index.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import Chart from './chart'
2+
import AspectCalculator from './aspect'
3+
import { Settings } from './settings'
24

3-
export default Chart
4-
5-
export { Chart }
5+
export { Chart, AspectCalculator, Settings }
6+
export default Chart

webpack.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const path = require('path');
1+
const path = require('path')
22

33
module.exports = {
44
entry: './project/src/index.ts',
@@ -24,4 +24,4 @@ module.exports = {
2424
type: 'umd'
2525
}
2626
},
27-
};
27+
}

0 commit comments

Comments
 (0)