Skip to content

Commit

Permalink
types
Browse files Browse the repository at this point in the history
  • Loading branch information
lavrton committed Sep 16, 2024
1 parent c7fe954 commit 15b8d3e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
3 changes: 0 additions & 3 deletions .npmrc

This file was deleted.

8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Change Log

All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [3.1.1] - 2024-09-16

- Fix typescript declaration file
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@
"url": "https://github.com/konvajs/vue-konva/issues"
},
"scripts": {
"build": "vite build && cp ./index.d.ts ./dist/index.d.ts",
"test": "vitest"
"build": "vite build && npm run tsc",
"test": "vitest",
"tsc": "tsc src/index.ts --declaration --emitDeclarationOnly --outDir ./dist --declarationDir ./dist"
},
"peerDependencies": {
"konva": ">7",
Expand Down
9 changes: 4 additions & 5 deletions tests/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,7 @@ describe('Test props setting', () => {
const rect = (wrap.vm.$refs.rect as any).getNode();
expect(rect.eventListeners.click).to.equal(undefined);

const handler = () => {
};
const handler = () => {};
wrap.setProps({
click: handler,
});
Expand Down Expand Up @@ -398,7 +397,7 @@ describe('Test props setting', () => {

const layer = (vm.$refs.layer as any).getNode();

const spyBatchDraw = vi.spyOn(layer, 'batchDraw');
const spyBatchDraw = vi.spyOn(layer, 'batchDraw');

vm.rect.width = 50;
vm.rect.width = 150;
Expand Down Expand Up @@ -799,7 +798,7 @@ describe('Test Events', () => {
},
{
propsData: {
click: onClickRect,// TODO
click: onClickRect, // TODO
},
},
);
Expand Down Expand Up @@ -876,7 +875,7 @@ describe('Test drawing calls', () => {
config.global.plugins = [];
});
it('Draw layer on mount', () => {
const batchDraw = vi.spyOn(Konva.Layer.prototype, 'batchDraw');
const batchDraw = vi.spyOn(Konva.Layer.prototype, 'batchDraw');

mount({
template: `
Expand Down

0 comments on commit 15b8d3e

Please sign in to comment.