I am looking to create a new class that inherits from Vinyl. The constructor in the superclass takes a single parameter of type ConstructorOptions
.
export default class MarkupVinylFile extends Vinyl {
public constructor(options: ConstructorOptions) {
super(options);
}
// ...
}
However, I am facing an issue with importing the ConstructorOptions
for use as a type annotation. In vinyl/index.d.ts
, it is defined as:
interface ConstructorOptions {
cwd?: string | undefined;
// ...
}
I am unable to import it using
import Vinyl, { ConstructorOptions } from "vinyl";
.
Can anyone suggest a way to import the ConstructorOptions
?