jsigbiz / spec

JavaScript signature notation
131 stars 6 forks source link

Global literals #43

Open Raynos opened 9 years ago

Raynos commented 9 years ago

In jsig you can currently do something like

// foo : null
var foo = null

// bar : "foo"
var bar = "foo"

However you cannot say that something is a literal value from global scope.

For example

// foo : ???
var foo = String;

We cannot use the syntax foo : String to define this as that's ambigious.

I propose that we denote that a value is literally equivelant to a known global variable with the following syntax:

// foo : global.String
var foo = String;