add optional type parameter to workspaceToCode
Merge pull request #46 from code-dot-org/workspaceToCode_type

add optional type parameter to workspaceToCode