Skip to content

[BUG] Injection tokens and provider function docs are displayed as undefined #3557

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
xelaint opened this issue Mar 11, 2025 · 3 comments
Open
Assignees
Labels
package: daff.io @daffodil/daff.io tools: dgeni @daffodil/tools-dgeni
Milestone

Comments

@xelaint
Copy link
Member

xelaint commented Mar 11, 2025

🐛 Bug report

Current Behavior

Injection tokens and provider function docs are displayed as undefined

Expected Behavior

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

Environment


Daffodil version: X.Y.Z
Angular version: X.Y.Z 

 
For Tooling issues:
- Node version: XX  
- Platform:  

Others:

@xelaint xelaint added the bug A confirmed bug report label Mar 11, 2025
@xelaint xelaint added this to the Daffodil v1.0 milestone Mar 11, 2025
@griest024
Copy link
Member

likely caused by #3549

@xelaint
Copy link
Member Author

xelaint commented Mar 11, 2025

Changing this:

export const {
  token: DAFF_TOAST_OPTIONS,
  /**
   * Provider function for {@link DAFF_TOAST_OPTIONS}.
   */
  provider: provideDaffToastOptions,
} = createConfigInjectionToken<DaffToastOptions>(daffToastDefaultOptions, 'DAFF_TOAST_OPTIONS');

to this:

const result = createConfigInjectionToken<DaffToastOptions>(daffToastDefaultOptions, 'DAFF_TOAST_OPTIONS');

export const provideDaffToastOptions = result.provider;

export const DAFF_TOAST_OPTIONS = result.token;

generates the correct source code.

@griest024
Copy link
Member

@xelaint good to know. Once we have the type inference dgeni code in place, it shouldn't matter how we define the source code. If TS can figure out the correct type, then dgeni will know about it.

@xelaint xelaint added package: daff.io @daffodil/daff.io tools: dgeni @daffodil/tools-dgeni and removed bug A confirmed bug report labels Mar 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: daff.io @daffodil/daff.io tools: dgeni @daffodil/tools-dgeni
Projects
None yet
Development

No branches or pull requests

2 participants