pathpida
pathpida copied to clipboard
[path parameter] interface ... extends ... が利用できない
export interface Query {
id: number
}
(上の例はいずれにせよ ParsedUrlQueryInput
に代入不可と言われてしまう)
import { ParsedUrlQueryInput } from 'querystring'
export interface Query extends ParsedUrlQueryInput {
id: number
}
利用できても良いかな、ぐらいに思った。
上のパターンは検知はされるが、next.jsの型定義の更新で使えなくなったというほうが正しそう。
下は検知されない。
単純な type export の網羅度の話になりそうか。
- [x]
export type Query
- [x]
export interface Query { /* ... */ }
- [ ]
export interface Query extends ... { /* ... */ }
- [ ]
export { Query }
- [ ]
export type { Query }
- [ ]
export { type Query }
- [ ]
export { A as Query }
- [ ]
export type { A as Query }
- [ ]
export { type A as Query }
- [ ]
export { Others, Query }
- [ ]
export ... from ...
系
も