-
Notifications
You must be signed in to change notification settings - Fork 586
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Module @microsoft/fast-element
has no exported member InlineTemplateDirective
#6912
Comments
Thanks @ontoneio - Which version are you on of Fast Element? I'll check FE1, but if I recall that was added for the latest beta (which won't reflect yet in the docs). |
Hi @chrisdholt , Thanks for the quick response. I am using |
Yep - The directive is in that specific version though, it's only in the Beta as part of the v2 release. I am looking to propose promoting that to stable soon-ish. With that said, I'm not sure what it would take to backport that off the top of my head. |
If it helps the export function staticallyCompose<TSource = any, TParent = any>(
item: StaticallyComposableHTML<TSource, TParent>
): CaptureType<TSource, TParent> {
if (!item) {
return InlineTemplateDirective.empty;
}
if (typeof item === "string") {
return new InlineTemplateDirective(item);
}
if ("inline" in item) {
return item.inline();
}
return item;
} I'm not exactly sure what this function accomplishes, but if I can replace it's functionality I think I will be alright. |
Looks like this is solved in v2, I'll close this for now, let us know after launch of |
馃悰 Bug Report
In the /utilities/template-helper.js file there is an import by the name of
InlineTemplateDirective
which comes from the@microsoft/fast-element
package that throws an error because it doesn't exist.InlineTemplateDirective
is also not found in the documentation for @microsoft/fast-element馃捇 Repro or Code Sample
import { InlineTemplateDirective } from "@microsoft/fast-element"
in a javascript file node.js dev environmentModule '"@microsoft/fast-element"' has no exported member 'InlineTemplateDirective'.
馃 Expected Behavior
Import doesn't throw typescript error and documentation on website shows type or method with this name.
馃槸 Current Behavior
No access to
InlineTemplateDirective
importerror message:
Module '"@microsoft/fast-element"' has no exported member 'InlineTemplateDirective'.
馃拋 Possible Solution
Update the documentation and
template-helpers.js
file馃敠 Context
I was copying and studying some of the helper utilities and ran into this bug while experimenting with component composition
馃實 Your Environment
The text was updated successfully, but these errors were encountered: