Element implicitly has an 'any' type because type 'MyFancyType' has no index signature.",
class MyPerson {
public name: string;
public subscriptions: MyFancyType[];
constructor(name: string, subscriptions: MyFancyType){...}
}Estimated time: 10 minutes
| /* bling.js */ | |
| window.$ = document.querySelector.bind(document); | |
| window.$$ = document.querySelectorAll.bind(document); | |
| Node.prototype.on = window.on = function(name, fn) { this.addEventListener(name, fn); }; | |
| NodeList.prototype.__proto__ = Array.prototype; | |
| NodeList.prototype.on = function(name, fn) { this.forEach((elem) => elem.on(name, fn)); }; |
| var YQL = require('yql'); | |
| var query = new YQL('SELECT * FROM weather.forecast WHERE (location = 94089)'); | |
| query.exec(function(err, data) { | |
| var location = data.query.results.channel.location; | |
| var condition = data.query.results.channel.item.condition; | |
| console.log('The current weather in ' + location.city + ', ' + location.region + ' is ' + condition.temp + ' degrees.'); | |
| }); |