forked from microsoft/TypeScript
-
Notifications
You must be signed in to change notification settings - Fork 0
API Breaking Changes
Zhengbo Li edited this page Apr 21, 2015
·
21 revisions
- Property
selectionis removed from typeDocument - Property
clipboardDatais removed from typeWindow - Removed interface
MSEventAttachmentTarget - Properties
onresize,disabled,uniqueID,removeNode,fireEvent,currentStyle,runtimeStyleare removed from typeHTMLElement - Property
urlis removed from typeEvent - Properties
execScript,navigate,itemare removed from typeWindow - Properties
documentMode,parentWindow,createEventObjectare removed from typeDocument - Property
parentWindowis removed from typeHTMLDocument - Property
setCapturedoes not exist anywhere now - Property
releaseCapturedoes not exist anywhere now - Properties
setAttribute,styleFloat,pixelLeftare removed from typeCSSStyleDeclaration - Property
selectorTextis removed from typeCSSRule -
CSSStyleSheet.rulesis of typeCSSRuleListinstead ofMSCSSRuleList -
documentElementis of typeElementinstead ofHTMLElement -
Eventhas a new required propertyreturnValue -
Nodehas a new required propertybaseURI -
Elementhas a new required propertyclassList - Properties
MSPOINTER_TYPE_MOUSE,MSPOINTER_TYPE_TOUCHare removed from typeMSPointerEvent -
CSSStyleRulehas a new required propertyreadonly - Property
execUnsafeLocalFunctionis removed from typeMSApp - Global method
toStaticHTMLis removed -
HTMLCanvasElement.getContextnow returnsCanvasRenderingContext2D | WebGLRenderingContex - Removed extension types
Dataview,Weakmap,Map,Set -
XMLHttpRequest.sendhas two overloadssend(data?: Document): void;andsend(data?: String): void; -
window.orientationis of typestringinstead ofnumber
-
TypeChecker.emitFilesis no longer available; useProgram.emitinstead. - 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
- Compiler Options
- tsconfig.json
- Integrating with Build Tools
- Nightly Builds
TypeScript Language Advanced
- Mixins
- Declaration Merging
- Type Inference
- Type Compatibility
- JSX
- Writing Declaration 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
- Debugging Language Service in VS Code
FAQs