Skip to content
This repository was archived by the owner on May 23, 2019. It is now read-only.

added hacky, ugly, multi path support #1

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

maxcan
Copy link
Member

@maxcan maxcan commented Mar 18, 2014

@gregwebs this is pretty ugly but does create correct typescript code (in our limited test case) that will expect an array for multpiecepathpieces.

where
marshallFxn = "var __mrshl = (p:any) => (typeof p === 'array' ? p.join('/') : p.toString())\n"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this test works in every browser. It seems like we should be able to know whether the return value is an array or not since we are creating it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Theoretically yes, but it would involve restructuring the code quite a bit. What part do you think wouldn't work in every browser? AFAIK, the ternary operator, .join() and .toString() are standard.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typeof ... 'array' does not work

@gregwebs
Copy link
Contributor

It makes sense to me to not pull this until we need it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants