Skip to content
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

log and friends missing on IFunctionContext #46

Closed
poelstra opened this issue Feb 7, 2019 · 8 comments · Fixed by #68
Closed

log and friends missing on IFunctionContext #46

poelstra opened this issue Feb 7, 2019 · 8 comments · Fixed by #68
Assignees
Labels
Enhancement New feature or request fix-ready Indicates that an issue has been fixed and will be available in the next release.

Comments

@poelstra
Copy link

poelstra commented Feb 7, 2019

IFunctionContext as defined in durable-functions doesn't have the log property (and others).

image

It would be nice if it could use a more 'in-sync' definition such as from @azure/functions

@kashimiz kashimiz added the Enhancement New feature or request label Feb 7, 2019
@kashimiz
Copy link
Contributor

kashimiz commented Feb 7, 2019

Hi @poelstra,

When durable-functions moved to GA availability the TypeScript definitions weren't yet available, but now that they are, you're absolutely right that we should be using them. Putting this on the list of enhancements for our next release.

@kashimiz kashimiz self-assigned this Feb 7, 2019
@kashimiz kashimiz added this to the 1.2.0 milestone Feb 7, 2019
@bernitorres
Copy link

Is there a workaround to log messages in the orchestrator function in typescript?

@kashimiz
Copy link
Contributor

@bernitorres, the context object still has the log method; it's just not defined in the TypeScript interface. Have you tried something like the following?

(context as any).log("This is my log message.");

@bernitorres
Copy link

I should have known that.. thanks! That unblocked me

@kashimiz kashimiz modified the milestones: 1.2.0, 1.1.5 Apr 22, 2019
kashimiz added a commit to kashimiz/azure-functions-durable-js that referenced this issue Apr 22, 2019
@kashimiz kashimiz added the fix-ready Indicates that an issue has been fixed and will be available in the next release. label Apr 22, 2019
@kevinclarkneudesic
Copy link

I found this same issue. Why was durable-functions or @azure/functions not written in TypeScript?? Seems amazing that a modern library esp. by Microsoft would be written in vanilla JS. Then there would not be a need for manually creating definition files. (facepalm)

@poelstra
Copy link
Author

Why was durable-functions or @azure/functions not written in TypeScript

They are. See #46 (comment) though.

@kevinclarkneudesic
Copy link

Why was durable-functions or @azure/functions not written in TypeScript

They are. See #46 (comment) though.

Sorry, haven't had my coffee yet. :/ Lol. I re-read and think I understand the issue now, since they are two separate libraries they were out of sync?

@poelstra
Copy link
Author

Something like that, yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request fix-ready Indicates that an issue has been fixed and will be available in the next release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants