Skip to content

Instantly share code, notes, and snippets.

This file has been truncated, but you can view the full file.
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
let data = []
for (let x = 0; x < 5;) {
data.push(() => x);
x++
}

Proposed module resolution strategy

Proposed set of rules is an extension to baseUrl based mechanics used by RequireJS or SystemJS.

Core elements of the system are baseUrl and path mappings. Resolution process describes how they are used together.

BaseUrl

All non-rooted paths are computed relative to baseUrl. Value of baseUrl is determined as either:

Proposed module resolution strategy

Proposed set of rules is an extension to baseUrl based mechanics used by RequireJS or SystemJS.

Core elements of the system are baseUrl and path mappings. Resolution process describes how they are used together.

BaseUrl

All non-rooted paths are computed relative to baseUrl. Value of baseUrl is determined as either:

"use strict"
class ErrorBox {
constructor(div, gate) {
this.div = div;
console.log(div); //Output some instance
gate.addEventListener(this.gateListener);
}
gateListener(e) {
console.log(this.div); //Output undefined
declare namespace q.SomeEnum {
export type SomeEnum = number ;
export var SomeEnum : {
A : SomeEnum ,
B : SomeEnum ,
};
}
declare module 'goog:SomeEnum' {
import alias = q.SomeEnum
<html>
<head>
<title>Test</title>
<script language="javascript" src="system.js"></script>
<script>
System.config({
paths: {
'*': '*.js'
}
});
// babel file1.ts -m system
System.register(['angular2/src/facade/lang', 'angular2/src/facade/collection', './reflection_capabilities', './reflector'], function (_export) {
'use strict';
var Type, isPresent, List, ListWrapper, ReflectionCapabilities, Reflector, reflector;
return {
setters: [function (_angular2SrcFacadeLang) {
Type = _angular2SrcFacadeLang.Type;
isPresent = _angular2SrcFacadeLang.isPresent;
}, function (_angular2SrcFacadeCollection) {
<html>
<head>
<title>Text</title>
<script src="system.src.js"></script>
</head>
<body>
<script>
System.paths = {
'*': '*.js',
'lodash':'node_modules/lodash/index.js'
module M {
interface MyArray<T> {
push(value: T): void
}
let x = [1];
x.push(2);
let y: MyArray<string>;
y.push("123")