jsigbiz / spec

JavaScript signature notation
130 stars 6 forks source link

Global literals #43

Open Raynos opened 10 years ago

Raynos commented 10 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;