-
-
Notifications
You must be signed in to change notification settings - Fork 932
Closed
Labels
A-isolated-declarationsIsolated DeclarationsIsolated DeclarationsC-bugCategory - BugCategory - Buggood first issueExperience Level - Good for newcomersExperience Level - Good for newcomers
Description
async keyword is not allowed in isolated declarations.
Repro:
import { isolatedDeclaration } from 'oxc-transform'
import { transpileDeclaration } from 'typescript'
const code = `
class Test {
async getValue(): Promise<string> {
return 'Hello World';
}
}
`
const oxc = isolatedDeclaration('test.ts', code)
const ts = transpileDeclaration(code, {})
console.log(
oxc.sourceText,
ts.outputText
)Output:
declare class Test {
async getValue(): Promise<string>;
}
declare class Test {
getValue(): Promise<string>;
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-isolated-declarationsIsolated DeclarationsIsolated DeclarationsC-bugCategory - BugCategory - Buggood first issueExperience Level - Good for newcomersExperience Level - Good for newcomers
Type
Fields
Give feedbackPriority
None yet