New 0.9.0 beta build for VS

Topics: General
Coordinator
Jun 2, 2013 at 6:46 PM
For those of you who are testing the 0.9.0 alpha, I just wanted to give you a quick heads up that we've just released a newer build (which we're calling 'beta' to easily tell them apart). It's available in:

https://typescript.codeplex.com/releases/view/105503

It contains some of the other new features we'd planned for the upcoming release, including enums, "export = " and the ability to grow classes and functions with modules of the same name.

Try it out and let us know what you think.
Jun 3, 2013 at 6:59 AM
What is missing from this release versus the 0.8 series? The 0.9 alpha was missing:
  • Refactor/rename
  • Debugging support
  • Find all reference
  • Compile-on-save
Have these been added to the beta?


Richard
Jun 3, 2013 at 1:17 PM
Great. Is there any chance you could write a blog post on the new changes? It would be helpful to explain the "export =" and what changes have been made to enums since 0.8.3.
Coordinator
Jun 3, 2013 at 1:37 PM
@rbirkby

The beta should include the features that were missing from the alpha. If you get a chance to check it out, please let us know if something is missing or doesn't appear to be working correctly.

@MgSam

We'll do a blog post on the new features for the release. Until then, I believe there are a few threads on here talking about the directions we took. You may also be able to look through the unit tests for "export =" and "enum" until then to see examples using those features.
Jun 4, 2013 at 8:54 PM
This beta does not work correctly. When loading project with *.ts files there is error message like 'TypeScriptLanguageService 0.8.9.1 did not load correctly'. Editor does not have lists with classes/types and functions. Without these features, this beta is useless.
Coordinator
Jun 4, 2013 at 8:59 PM
@codefox - I haven't seen this issue before. Could you try uninstalling the TypeScript plugin and reinstalling it? It may not work with WebEssentials, so if you happen to have that installed, you may want to uninstall that first before running the beta.
Jun 4, 2013 at 10:03 PM
Clarification. This beta does not work correctly with VS Express For Web. With VS PRO these list are visible. So, plesae fix this beta to be usable for Express users.
As for errors, functions within generic classes, are not visible on list.
Jun 5, 2013 at 8:24 PM
Could you guys add a beta channel for npm?
Jun 6, 2013 at 3:08 AM
@jonturner I'm fairly sure that for enums at least, you haven't mentioned any changes publicly, at least not since reverting the enum Foo{ bar: 3 } syntax. I looked through the unit tests and I was saddened to not see any string-enum support yet, so I assume the changes were not about syntax.
Jun 6, 2013 at 8:24 AM
Edited Jun 6, 2013 at 8:44 AM
The 0.9 beta enum solution is not bad all and there is support for string to enum conversion and vice versa:
enum Foo {
    bar = 0,
    baz = 1
}

var barVal = Foo.bar;
var barLabel = Foo[Foo.bar]; 
var fooParse: Foo = Foo["bar"]; // equiv. to say Enum.parse(typeof(Foo), "bar")
var fooEnumerate = Object.keys(Foo).filter(item => isNaN(parseInt(item)));

console.log(barVal); // 0
console.log(barLabel);  // "bar"
console.log(fooParse);  // 0
console.log(fooEnumerate.join(",")); // "bar", "baz"
There are a couple of issues:
enum Foo {
    bar = 0,
    baz = 1,
    qux, // overwrites bar
    22 // shouldn't permit numeric labels
}
We shouldn't permit numeric enum labels because it affects the Object.keys enumeration.
Coordinator
Jun 6, 2013 at 6:03 PM
@AndrewGaspar - I just noticed someone has created a new npm package just for that: https://npmjs.org/package/typescript-dev
Coordinator
Jun 6, 2013 at 6:36 PM
@codefox - I've put a new beta up, which hopefully fixes the issue with express. If you get a chance to try it out, please let me know if it works for you.
Jun 6, 2013 at 8:36 PM
@jonturner - thanks for fix, now these lists are working correctly
Jun 6, 2013 at 10:52 PM
@jonturner - Thanks!

Andrew Gaspar


Jun 7, 2013 at 5:48 PM
I'm getting an error in 0.9 for something that worked before. Previously I had this:
// dojo.d.ts
declare module dojo.query.pseudos {
    export function has(name: any, condition: any): any;
    export function visible(name: any, condition: any): any;
    export function hidden(name: any, condition: any): any;
    export function selected(name: any, condition: any): any;
    export function checked(name: any, condition: any): any;
    export function disabled(name: any, condition: any): any;
    export function enabled(name: any, condition: any): any;
    export function input(name: any, condition: any): any;
    export function button(name: any, condition: any): any;
    export function header(name: any, condition: any): any;
}
declare module dojo {
    export function query(refNode: Node): any;
    export function query(query: string, refNode?: Node): any;
}
But now it gives the error "Duplicate identifier 'query.'"

If I rearrange the order of the blocks so the function is declared first the declaration has no errors but every usage of query has the error "Unable to invoke type with no call signatures."

Is this a bug or should I be doing my declaration differently now?
Coordinator
Jun 7, 2013 at 6:18 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Jun 7, 2013 at 9:56 PM
I'll take that to mean it's not expected behaviour. :)