-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Description
We have the following in our changelog:
* All interfaces now need to use method signature style rather than property function style
eg:
before
```ts
interface Foo {
bar: (baz: number) => void
}
```
after
```ts
interface Foo {
bar(baz: number): void
}
```
typescript-docs-verifier fails to compile this with:
Error compiling example code block 2 in file CHANGELOG.md:
⨯ Unable to compile TypeScript:
CHANGELOG.md → Code Block 2:2:3 - error TS2300: Duplicate identifier 'bar'.
2 bar(baz: number): void
~~~
CHANGELOG.md → Code Block 2:2:3
2 bar: (baz: number) => void
~~~
'bar' was also declared here.
Original code:
1| interface Foo {
2| bar(baz: number): void
3| }
4|
I guess it's combining the two interface definitions?
Is there anyway to stop this from happening or otherwise treat the snippets as independent?
paulbrimicombe
Metadata
Metadata
Assignees
Labels
No labels