Skip to content

Commit

Permalink
chore: remove todo comment of tsdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
kmkzt committed Jun 14, 2022
1 parent a2613bb commit 0c17b9c
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 19 deletions.
7 changes: 0 additions & 7 deletions examples/react/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,4 @@ module.exports = {
// For gh-pages
basePath: process.env.BASE_PATH || '',
assetPrefix: process.env.BASE_PATH || '',
webpack(config, { dev }) {
/**
* @todo Add eslint-webpack-plugin.
* https://github.com/webpack-contrib/eslint-webpack-plugin
*/
return config
},
}
2 changes: 1 addition & 1 deletion packages/animation/src/animation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('animation.ts', () => {
})
expect(svg.generateFrame().length).toBe(1)
})
// TODO: Improve test pattern
// TODO Improve test pattern
it('toAnimationElement', () => {
const svg = generateAniamtion()
const testAnimation: FrameAnimation = (paths, count) => {
Expand Down
4 changes: 2 additions & 2 deletions packages/animation/src/animation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class SvgAnimation {
public svg: Svg
public renderer: Renderer
public resizeHandler: ResizeHandler
/** Relation animate element TODO: add easing option */
/** Relation animate element */
private _repeatCount: string
constructor(
el: HTMLElement,
Expand Down Expand Up @@ -228,7 +228,7 @@ export class SvgAnimation {
)
}

/** @param filename TODO: Support gif and apng */
/** @param filename */
public download(filename?: string): void {
downloadBlob({
data: svg2base64(this.toElement().outerHTML),
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/drawing.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ describe('drawing.ts', () => {
expect(el).toMatchSnapshot()
})

/** TODO: Fix NaN */
// TODO: Fix NaN
it('undo()', () => {
const draw: SvgDrawing = new SvgDrawing(document.createElement('div'))
draw.drawStart()
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export class Renderer {
const { width, height } = el.getBoundingClientRect()
el.appendChild(svgObjectToElement({ background, width, height, paths: [] }))
}
/** Render TODO: XSS test TODO: Partially renderable */

public update(svgObj: SvgObject): void {
this.el.replaceChild(svgObjectToElement(svgObj), this.el.childNodes[0])
}
Expand Down
3 changes: 0 additions & 3 deletions packages/core/src/svg.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ describe('svg.ts', () => {
path.parseCommandString(testData)
expect(path.getCommandString()).toBe(testData)
})
// TODO: Validate command
it.skip('failed pattern', () => {
path.parseCommandString('M a b')
expect(path.getCommandString()).toBe('')
Expand Down Expand Up @@ -173,7 +172,6 @@ describe('svg.ts', () => {
let svg: Svg
beforeEach(() => {
svg = new Svg({ width: 500, height: 500 })
// TODO: rewrite bezier curve test
.addPath(
new Path()
.addCommand(new Command(COMMAND_TYPE.MOVE, [0, 0]))
Expand Down Expand Up @@ -228,7 +226,6 @@ describe('svg.ts', () => {
new Svg({ width: 400, height: 400 }).parseSVGElement(svgEl)
).toMatchSnapshot()
})
// TODO: Fix width, height
it('toJson', () => {
expect(svg.toJson()).toMatchSnapshot()
})
Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/svg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ export class Vector {
}

/**
* TODO: refactor command. The following commands are not supported. Cannot
* support commands that use `M` or` z` more than once `M 0 0 L 1 1 Z M 1 1 L 2 2 Z`
* Cannot support commands that use `M` or` z` more than once `M 0 0 L 1 1 Z M 1
* 1 L 2 2 Z`
*/
export class Path {
public attrs: PathObject
Expand Down Expand Up @@ -254,7 +254,7 @@ export class Svg {
this.background = background
}

/** @todo Check height */
// TODO: Resize from height
public resize({ width, height }: { width: number; height: number }) {
this.scalePath(width / this.width)
this.width = width
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** Svg Path JSON TODO: improve key types */
/** Svg Path JSON */
export type PathObject = {
[camelCase: string]: string | undefined
}
Expand Down

0 comments on commit 0c17b9c

Please sign in to comment.