patterns TypeScript size interface IModelChangeAccessor { insertText(position:IPosition, text:string): IEditorPosition; deleteText(range:IRange):

Slides:



Advertisements
Similar presentations
Portability and Safety Mahdi Milani Fard Dec, 2006 Java.
Advertisements

Callback-oriented asynchrony, CommonJS Promise/A, Promises in Q, Promises in jQuery George Georgiev Telerik Software Academy academy.telerik.com Technical.
Written by: Dr. JJ Shepherd
Building a large scale JavaScript application in TypeScript Alexandru Dima Microsoft.
3-594 Graphics Profiler Graphics Frame Analysis Windows Phone Apps.
North Shore.NET User Group Our Sponsors. North Shore.NET User Group Check out our new web site Next Meeting
NextGen Technology upgrade – Synerizip - Sandeep Kamble.
Using Promise Patterns with JavaScript, jQuery, and the SharePoint 2013 App Model Doug Hemminger SharePoint Solutions Architect, Protiviti.
Introducing NativeScript [Pavel Kolev Software Telerik: a Progress company]
JIT in webkit. What’s JIT See time_compilation for more info. time_compilation.
+ A Short Java RMI Tutorial Usman Saleem
JavaScript Patterns and Node Idioms by Rob Richardson
Object-Oriented Programming (OOP). Implementing an OOD in Java Each class is stored in a separate file. All files must be stored in the same package.
Introduction to java Prepared By:-Pragnesh Patel Lect. In Computer Dept. NSIT,Jetalpur 1.
Netprog: Java Intro1 Crash Course in Java. Netprog: Java Intro2 Why Java? Network Programming in Java is very different than in C/C++ –much more language.
VHDL FLI. FLI Definition FLI routines are C programming language functions that provide procedural access to information within the HDL simulator.
Introduction to TypeScript Sergey Barskiy Architect Level: Introductory.
1 First BlueJ Day, Houston, Texas, 1st March 2006 Writing BlueJ Extensions Ian Utting University of Kent.
TypeScript Allan da Costa Pinto Technical Evangelist Microsoft.
JDojo and Its Usage Te-Hsin Shih 04/30/2013. Dojo Dojo Toolkit is an open source JavaScript library designed to ease the rapid development of cross-platform,
FUNCTIONS IN C++. DEFINITION OF A FUNCTION A function is a group of statements that together perform a task. Every C++ program has at least one function,
Chapter 10 Classes and Objects In-Depth. Chapter 10 A class provides the foundation for creating specific objects, each of which shares the general attributes,
Julian on JavaScript: Functions Julian M Bucknall, CTO.
Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216.
Canopy walk through Single-Page Apps (SPAs) Benjamin Howarth Freelancer, Code Gecko Umbraco UK Festival, Fri 30 th Oct 2015 CODE GECKO.
“RequireJS is a JavaScript file and module loader. It is optimized for in-browser use, but it can be used in other JavaScript environments, like Rhino.
Plug-in Architectures Presented by Truc Nguyen. What’s a plug-in? “a type of program that tightly integrates with a larger application to add a special.
N. HARIKA Lecturer(csc). 3 General Structure Of A Java Program.
patterns TypeScript size.
Iterators, Iterator, and Iterable 2015-T2 Lecture 8 School of Engineering and Computer Science, Victoria University of Wellington COMP 103 Thomas Kuehne.
Rich Internet Applications 2. Core JavaScript. The importance of JavaScript Many choices open to the developer for server-side Can choose server technology.
Support standard JavaScript code with static typing Encapsulation through classes and modules Support for constructors, properties and.
Today’s lecture Review of chapter 8 Go over examples.
Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216.
AP Java Ch. 4 Review Question 1  Java methods can return only primitive types (int, double, boolean, etc).
Random Logic l Forum.NET l State Machine Mechanism Forum.NET 1 st Meeting ● December 27, 2005.
CHAPTER 8 Scope, Lifetime, and More on Functions.
Node.JS introduction. What is Node.JS? v8 JavaScript runtime Event driven Non-blocking standard libraries Most APIs speak streams Provides a package manager.
Kernel Modules – Introduction CSC/ECE 573, Sections 001 Fall, 2012.
TypeScript for Alfresco and CMIS Steve Reiner CTO Integrated Semantics.
Windows 8: XAML or HTML? Karl Davies-Barrett CEE DPE Tech Lead, Microsoft 
Javascript Design Patterns. AMD & commonJS. RequireJS Marc Torrent Vernetta.
Mail Web Twitter TypeScript Rainer Stropek software architects gmbh JavaScript on Steroids.
1 Mashup Workflow. 2 What We Have 3 Challenges with REST APIs * Only ask what its built to answer * No standard - must relearn each time * Opaque - no.
Pyragen A PYTHON WRAPPER GENERATOR TO APPLICATION CORE LIBRARIES Fernando PEREIRA, Christian THEIS - HSE/RP EDMS tech note:
Java for android Development Nasrullah Khan. Using instanceof in Android Development the classes such as Button, TextView, and CheckBox, which represent.
ANGULAR 2. JavaScript is a high-level, dynamic, untyped, and interpreted programming language. JavaScript was originally developed in May 1995 by Brendan.
Node.js Modules Header Mastering Node.js, Part 2 Eric W. Greene
Application Architecture, Redux
Introduction to TypeScript
Review What is an object? What is a class?
Introduction to Redux Header Eric W. Greene Microsoft Virtual Academy
Delegates and Events 14: Delegates and Events
Promises and Asynchronous Programming
SharePoint Bruger Gruppe (SPBG) SharePoint Framework Introduction
Implementing Chares in a High-Level Scripting Language
Nick Trogh Technical Evangelist, Microsoft.
Working with different JavaScript frameworks and libraries
JavaScript Reserved Words
TechEd /18/ :08 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
CS5220 Advanced Topics in Web Programming Angular – TypeScript
CS5220 Advanced Topics in Web Programming More Node.js
Web API with Angular 2 Front End
4/25/2019 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
CS5220 Advanced Topics in Web Programming Angular – TypeScript
CS5220 Advanced Topics in Web Programming More Node.js
Windows Azure Anders Hejlsberg Technical Fellow 3-012
JavaScript Session III
Plug-In Architecture Pattern
Promises.
Presentation transcript:

patterns TypeScript size

interface IModelChangeAccessor { insertText(position:IPosition, text:string): IEditorPosition; deleteText(range:IRange): IDeleteTextResult; } interface IEditableTextModel { change(callback: (changeAccessor:IModelChangeAccessor)=>any): … } Interfaces to be implemented

export interface IValidationFilter { (resource:IEventEmitter): boolean; } public constructor(filter:IValidationFilter) { } new Validator((resource)=>this.includeModel(resource)); Callbacks

interface ICommonEditorOptions { selectOnLineNumbers?:boolean; glyphMargin?:boolean; roundedSelection?:boolean; theme?:string; readOnly?:boolean; //… } Option bags

var options:IBuildData = JSON.parse(req.responseText); export interface IBuildData { requestId:string; logOutput?:string; buildOutput?:BuildOutput; killOutput?:KillOutput; } JSON structures

declare module WinJS { module Binding { //... } class Promise { //... } External types from other libraries

promise.then((result) => {...}, (err) => {...});

class Promise { then (success?: (value: T) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise ; //… } export interface ITypeDeclarationSupport { findTypeDeclaration(position:Editor.IPosition):Promise ; }

TSD: a package manager to search and install TypeScript definition files directly from the DefinitelyTyped repository.TypeScript DefinitelyTyped TSD: a package manager to search and install TypeScript definition files directly from the DefinitelyTyped repository.TypeScript DefinitelyTyped

We started with internal modules

patterns TypeScript size

“… our dependency graph was such a mess that each area had a dependency on just about every other area.”

File main.ts: import adder= require("./adder"); adder.add(3,4); File adder.ts: export function add(op1: number, op2: number):number { return op1+op2; }

var adder = require(“adder”); adder.add() tsc --module amd main.ts tsc --module commonjs main.ts

AMD in JavaScript define([‘…./winjs.base‘, ‘…./zoneWidget’], function(WinJS, ZoneWidget) { … } ); AMD in TypeScript import WinJS= require('vs/base/lib/winjs'); import ZoneWidget = require('vs/editor/zoneWidget');

csharp.ts export class CSMode extends AbstractMode { constructor() { super('vs.languages.csharp'); } // lots of code …. } csharp.contribution.ts modeRegistry.registerMode( [‘text/x-csharp'], new Platform.Descriptor( 'vs/languages/csharp/csharp', ‘CSMode') ); Registered on start-up Loaded on demand

patterns TypeScript size

“As I did conversions, I began typing various object literals I was passing around as interfaces. Soon enough, I realized how inconsistent I was, the same data was flowing around in at least 3 different formats. This is because of the easiness through which you can create literals in JavaScript …. Need some placeholder for data?... Just create a new literal object.”

tsc –declarations –out typescriptservices.js typescript.ts

for MSDN Ultimate subscribers Go to SPECIAL OFFERS Partner Program