This is a runtime library for \href{http://www.typescriptlang.org/}{\texttt{ Type\+Script}} that contains all of the Type\+Script helper functions.

This library is primarily used by the {\ttfamily -\/-\/import\+Helpers} flag in Type\+Script. When using {\ttfamily -\/-\/import\+Helpers}, a module that uses helper functions like {\ttfamily \+\_\+\+\_\+extends} and {\ttfamily \+\_\+\+\_\+assign} in the following emitted file\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{var \_\_assign = (this \&\& this.\_\_assign) || Object.assign || function(t) \{}
\DoxyCodeLine{    for (var s, i = 1, n = arguments.length; i < n; i++) \{}
\DoxyCodeLine{        s = arguments[i];}
\DoxyCodeLine{        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))}
\DoxyCodeLine{            t[p] = s[p];}
\DoxyCodeLine{    \}}
\DoxyCodeLine{    return t;}
\DoxyCodeLine{\};}
\DoxyCodeLine{exports.x = \{\};}
\DoxyCodeLine{exports.y = \_\_assign(\{\}, exports.x);}

\end{DoxyCode}


will instead be emitted as something like the following\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{var tslib\_1 = require("{}tslib"{});}
\DoxyCodeLine{exports.x = \{\};}
\DoxyCodeLine{exports.y = tslib\_1.\_\_assign(\{\}, exports.x); }

\end{DoxyCode}


Because this can avoid duplicate declarations of things like {\ttfamily \+\_\+\+\_\+extends}, {\ttfamily \+\_\+\+\_\+assign}, etc., this means delivering users smaller files on average, as well as less runtime overhead. For optimized bundles with Type\+Script, you should absolutely consider using {\ttfamily tslib} and {\ttfamily -\/-\/import\+Helpers}.\hypertarget{md_sfcode_node_modules__angular_devkit_build_webpack_node_modules_tslib_README_autotoc_md1023}{}\doxysection{Installing}\label{md_sfcode_node_modules__angular_devkit_build_webpack_node_modules_tslib_README_autotoc_md1023}
For the latest stable version, run\+:\hypertarget{md_sfcode_node_modules__angular_devkit_build_webpack_node_modules_tslib_README_autotoc_md1024}{}\doxysubsection{npm}\label{md_sfcode_node_modules__angular_devkit_build_webpack_node_modules_tslib_README_autotoc_md1024}

\begin{DoxyCode}{0}
\DoxyCodeLine{\# TypeScript 2.3.3 or later}
\DoxyCodeLine{npm install tslib}
\DoxyCodeLine{}
\DoxyCodeLine{\# TypeScript 2.3.2 or earlier}
\DoxyCodeLine{npm install tslib@1.6.1 }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules__angular_devkit_build_webpack_node_modules_tslib_README_autotoc_md1025}{}\doxysubsection{yarn}\label{md_sfcode_node_modules__angular_devkit_build_webpack_node_modules_tslib_README_autotoc_md1025}

\begin{DoxyCode}{0}
\DoxyCodeLine{\# TypeScript 2.3.3 or later}
\DoxyCodeLine{yarn add tslib}
\DoxyCodeLine{}
\DoxyCodeLine{\# TypeScript 2.3.2 or earlier}
\DoxyCodeLine{yarn add tslib@1.6.1 }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules__angular_devkit_build_webpack_node_modules_tslib_README_autotoc_md1026}{}\doxysubsection{bower}\label{md_sfcode_node_modules__angular_devkit_build_webpack_node_modules_tslib_README_autotoc_md1026}

\begin{DoxyCode}{0}
\DoxyCodeLine{\# TypeScript 2.3.3 or later}
\DoxyCodeLine{bower install tslib}
\DoxyCodeLine{}
\DoxyCodeLine{\# TypeScript 2.3.2 or earlier}
\DoxyCodeLine{bower install tslib@1.6.1 }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules__angular_devkit_build_webpack_node_modules_tslib_README_autotoc_md1027}{}\doxysubsection{JSPM}\label{md_sfcode_node_modules__angular_devkit_build_webpack_node_modules_tslib_README_autotoc_md1027}

\begin{DoxyCode}{0}
\DoxyCodeLine{\# TypeScript 2.3.3 or later}
\DoxyCodeLine{jspm install tslib}
\DoxyCodeLine{}
\DoxyCodeLine{\# TypeScript 2.3.2 or earlier}
\DoxyCodeLine{jspm install tslib@1.6.1 }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules__angular_devkit_build_webpack_node_modules_tslib_README_autotoc_md1028}{}\doxysection{Usage}\label{md_sfcode_node_modules__angular_devkit_build_webpack_node_modules_tslib_README_autotoc_md1028}
Set the {\ttfamily import\+Helpers} compiler option on the command line\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{tsc -\/-\/importHelpers file.ts }

\end{DoxyCode}


or in your tsconfig.\+json\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{\{}
\DoxyCodeLine{    "{}compilerOptions"{}: \{}
\DoxyCodeLine{        "{}importHelpers"{}: true}
\DoxyCodeLine{    \}}
\DoxyCodeLine{\} }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules__angular_devkit_build_webpack_node_modules_tslib_README_autotoc_md1029}{}\doxyparagraph{For bower and JSPM users}\label{md_sfcode_node_modules__angular_devkit_build_webpack_node_modules_tslib_README_autotoc_md1029}
You will need to add a {\ttfamily paths} mapping for {\ttfamily tslib}, e.\+g. For Bower users\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{\{}
\DoxyCodeLine{    "{}compilerOptions"{}: \{}
\DoxyCodeLine{        "{}module"{}: "{}amd"{},}
\DoxyCodeLine{        "{}importHelpers"{}: true,}
\DoxyCodeLine{        "{}baseUrl"{}: "{}./"{},}
\DoxyCodeLine{        "{}paths"{}: \{}
\DoxyCodeLine{            "{}tslib"{} : ["{}bower\_components/tslib/tslib.d.ts"{}]}
\DoxyCodeLine{        \}}
\DoxyCodeLine{    \}}
\DoxyCodeLine{\} }

\end{DoxyCode}


For JSPM users\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{\{}
\DoxyCodeLine{    "{}compilerOptions"{}: \{}
\DoxyCodeLine{        "{}module"{}: "{}system"{},}
\DoxyCodeLine{        "{}importHelpers"{}: true,}
\DoxyCodeLine{        "{}baseUrl"{}: "{}./"{},}
\DoxyCodeLine{        "{}paths"{}: \{}
\DoxyCodeLine{            "{}tslib"{} : ["{}jspm\_packages/npm/tslib@1.[version].0/tslib.d.ts"{}]}
\DoxyCodeLine{        \}}
\DoxyCodeLine{    \}}
\DoxyCodeLine{\} }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules__angular_devkit_build_webpack_node_modules_tslib_README_autotoc_md1030}{}\doxysection{Contribute}\label{md_sfcode_node_modules__angular_devkit_build_webpack_node_modules_tslib_README_autotoc_md1030}
There are many ways to \href{https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md}{\texttt{ contribute}} to Type\+Script.


\begin{DoxyItemize}
\item \href{https://github.com/Microsoft/TypeScript/issues}{\texttt{ Submit bugs}} and help us verify fixes as they are checked in.
\item Review the \href{https://github.com/Microsoft/TypeScript/pulls}{\texttt{ source code changes}}.
\item Engage with other Type\+Script users and developers on \href{http://stackoverflow.com/questions/tagged/typescript}{\texttt{ Stack\+Overflow}}.
\item Join the \href{http://twitter.com/\#!/search/realtime/\%23typescript}{\texttt{ \#typescript}} discussion on Twitter.
\item \href{https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md}{\texttt{ Contribute bug fixes}}.
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules__angular_devkit_build_webpack_node_modules_tslib_README_autotoc_md1031}{}\doxysection{Documentation}\label{md_sfcode_node_modules__angular_devkit_build_webpack_node_modules_tslib_README_autotoc_md1031}

\begin{DoxyItemize}
\item \href{http://www.typescriptlang.org/Tutorial}{\texttt{ Quick tutorial}}
\item \href{http://www.typescriptlang.org/Handbook}{\texttt{ Programming handbook}}
\item \href{http://www.typescriptlang.org/}{\texttt{ Homepage}} 
\end{DoxyItemize}