HaxeFoundation / HaxeFoundation/haxe

Dynamically named field on extern

Open
#9,825 9 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

I'm currently writing an extern for some js lib and I'm facing the following case:

```ts
type WrapOptions {
injectedPropName:String,
}
function wrapComponent(component:ReactType,?options:WrapOptions){
// ...
}
type WrappedComponentProps {
[injectedPropName]: InjectedShape
}
```

How could I type a prop with a dynamic name with Haxe 4.1? With a default value would be even better...

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.