forked from microsoft/TypeScript
-
Notifications
You must be signed in to change notification settings - Fork 0
API Breaking Changes
Niklas Mollenhauer edited this page May 11, 2015
·
20 revisions
- Property
selection
is removed from typeDocument
- Property
clipboardData
is removed from typeWindow
- Removed interface
MSEventAttachmentTarget
- Properties
onresize
,disabled
,uniqueID
,removeNode
,fireEvent
,currentStyle
,runtimeStyle
are removed from typeHTMLElement
- Property
url
is removed from typeEvent
- Properties
execScript
,navigate
,item
are removed from typeWindow
- Properties
documentMode
,parentWindow
,createEventObject
are removed from typeDocument
- Property
parentWindow
is removed from typeHTMLDocument
- Property
setCapture
does not exist anywhere now - Property
releaseCapture
does not exist anywhere now - Properties
setAttribute
,styleFloat
,pixelLeft
are removed from typeCSSStyleDeclaration
- Property
selectorText
is removed from typeCSSRule
-
CSSStyleSheet.rules
is of typeCSSRuleList
instead ofMSCSSRuleList
-
documentElement
is of typeElement
instead ofHTMLElement
-
Event
has a new required propertyreturnValue
-
Node
has a new required propertybaseURI
-
Element
has a new required propertyclassList
- Properties
MSPOINTER_TYPE_MOUSE
,MSPOINTER_TYPE_TOUCH
are removed from typeMSPointerEvent
-
CSSStyleRule
has a new required propertyreadonly
- Property
execUnsafeLocalFunction
is removed from typeMSApp
- Global method
toStaticHTML
is removed -
HTMLCanvasElement.getContext
now returnsCanvasRenderingContext2D | WebGLRenderingContex
- Removed extension types
Dataview
,Weakmap
,Map
,Set
-
XMLHttpRequest.send
has two overloadssend(data?: Document): void;
andsend(data?: String): void;
-
window.orientation
is of typestring
instead ofnumber
-
TypeChecker.emitFiles
is no longer available; useProgram.emit
instead. - Getting diagnostics are now all centralized on Program,
- for Syntactic diagnostics for a single file use:
Program.getSyntacticDiagnostics(sourceFile)
- for Syntactic diagnostics for all files use:
Program.getSyntacticDiagnostics()
- for Semantic diagnostics for a single file use:
Program.getSemanticDiagnostics(sourceFile)
- for Semantic diagnostics for all files use:
Program.getSemanticDiagnostics()
- for compiler options and global diagnostics use:
Program.getGlobalDiagnostics()
- for Syntactic diagnostics for a single file use:
Tip: use ts.getPreEmitDiagnostics(program) to get syntactic, semantic, and global diagnostics for all files
Here are the details:
-
CompilerHost.getDefaultLibFilename
=>CompilerHost.getDefaultLibFileName
-
SourceFile.filename
=>SourceFile.fileName
-
FileReference.filename
=>FileReference.fileName
-
LanguageServiceHost.getDefaultLibFilename
=>LanguageServiceHost.getDefaultLibFileName
-
LanguageServiceShimHost.getDefaultLibFilename
=>LanguageServiceShimHost.getDefaultLibFileName
The full list of APIs can be found in this commit
The syntacticClassifierAbsent
parameter for the Classifier.getClassificationsForLine is now required
See Pull Request #2051 for more details.
TextChange.start
and TextChange.length
became properties instead of methods.
SourceFile.getLineAndCharacterFromPosition
became SourceFile.getLineAndCharacterOfPosition
We did some cleanup to the public interfaces, here is the full list of changes:
- Commit 2ee134c6b3c0ec
- Commit 35dde28d44122c
- Commit c9ef4db99ac93bb1c166a
- Commit b4e5d5b0b460cc88a10db
TypeScript Language Basics
- Basic Types
- Interfaces
- Classes
- Namespaces and Modules
- Functions
- Generics
- Common Errors
- Integrating with Build Tools
- Compiler Options
- tsconfig.json
TypeScript Language Advanced
- Mixins
- Declaration Merging
- Type Inference
- Type Compatibility
- JSX
- Writing Definition Files
- Typings for NPM packages
News
TypeScript Contributors
- Contributing to TypeScript
- TypeScript Design Goals
- Coding Guidelines
- Spec conformance testing
- Useful Links for TypeScript Issue Management
- Writing Good Design Proposals
- Compiler Internals
Building Tools for TypeScript
- Architectural Overview
- Using the Compiler API
- Using the Language Service API
- Dev Mode in Visual Studio
FAQs