Skip to content

isolatedDeclarations doesn't preserve const on type parameters #4017

@MichaelMitchell-at

Description

@MichaelMitchell-at

Tested version: 0.16.3

> require('oxc-transform').isolatedDeclaration('hello.ts', `
    export function foo<const T>(t: T): T {
        return t;
    }
`)
{
  sourceText: 'export declare function foo<T>(t: T): T;\n',
  errors: []
}

Expected: export declare function foo<const T>(t: T): T;
Actual: export declare function foo<T>(t: T): T;

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-codegenArea - Code GenerationC-bugCategory - Bug

    Type

    No type

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions