Kotlin / dukat

Converter of <any kind of declarations> to Kotlin external declarations
557 stars 42 forks source link

Treat union types with void in return position as nullables #374

Open Schahen opened 4 years ago

Schahen commented 4 years ago

Following declarations are merge to a single function with union type as return

function mkdirSync(path: PathLike, options: MakeDirectoryOptions & { recursive: true; }): string;
    function mkdirSync(path: PathLike, options?: number | string | (MakeDirectoryOptions & { recursive?: false; }) | null): void;
    function mkdirSync(path: PathLike, options?: number | string | MakeDirectoryOptions | null): string | undefined;

Which, in turn, is resolved to dynamic. In fact we can treat any A | void as just A?