-
Notifications
You must be signed in to change notification settings - Fork 13
Decorator TS parameters. New js rug instance per invocation #229 #242
Conversation
kipz
commented
Jan 30, 2017
•
edited
Loading
edited
- add support for decorated parameters
- decorate actually just populates the 'parameters' property
- totally backwards compatible and interchangeable
I love the model. Would like to see some timing tests before merging. |
case x => x | ||
} | ||
|
||
clone.asInstanceOf[ScriptObjectMirror].callMember(member,processedArgs: _* ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nicer to match
val decoratedParamNames: Set[String] = clone.get("parameters") match { | ||
case ps: ScriptObjectMirror if !ps.isEmpty => { | ||
ps.asScala.collect { | ||
case (_, details: ScriptObjectMirror) if details.get("decorated").asInstanceOf[Boolean] => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nicer without casting.
@@ -0,0 +1,82 @@ | |||
package com.atomist.rug.runtime.js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to do it in this PR, but I added ability to load a TypeScript side file from the class path. Makes it easier to edit the TS. For example,
val jsed = TestUtils.editorInSideFile(this, "SimpleBanana.ts")
Where the TypeScript file is under test resources in the same package.
5c8e378
to
fc9420b
Compare
LGTM |