├── .gitignore ├── CoreWebAPIAndAngular.sln ├── README.md ├── global.json └── src └── CoreWebAPIAndAngular ├── .gitignore ├── Controllers ├── CustomersController.cs └── HomeController.cs ├── CoreWebAPIAndAngular.xproj ├── Model ├── Address.cs └── Customer.cs ├── Program.cs ├── Properties └── launchSettings.json ├── Repository ├── CustomersRepository.cs └── ICustomersRepository.cs ├── Service References └── Application Insights │ └── ConnectedService.json ├── Startup.cs ├── Views ├── Home │ └── Index.cshtml ├── Shared │ ├── Error.cshtml │ ├── _Layout.cshtml │ ├── _LoginPartial.cshtml │ └── _ValidationScriptsPartial.cshtml ├── _ViewImports.cshtml └── _ViewStart.cshtml ├── appsettings.json ├── package.json ├── project.json ├── tsconfig.json ├── typings.json ├── typings ├── globals │ └── core-js │ │ ├── index.d.ts │ │ └── typings.json └── index.d.ts ├── web.config └── wwwroot ├── app ├── app.component.js ├── app.component.js.map ├── app.component.ts ├── app.module.js ├── app.module.js.map ├── app.module.ts ├── app.routing.js ├── app.routing.js.map ├── app.routing.ts ├── customers │ ├── customers.component.html │ ├── customers.component.js │ ├── customers.component.js.map │ └── customers.component.ts ├── main.js ├── main.js.map ├── main.ts └── shared │ ├── customers.service.js │ ├── customers.service.js.map │ ├── customers.service.ts │ ├── interfaces.js │ ├── interfaces.js.map │ └── interfaces.ts ├── images └── .gitkeep ├── styles └── styles.css ├── systemjs.config.js └── typings.d.ts /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | [Xx]64/ 19 | [Xx]86/ 20 | [Bb]uild/ 21 | bld/ 22 | [Bb]in/ 23 | [Oo]bj/ 24 | 25 | # Visual Studio 2015 cache/options directory 26 | .vs/ 27 | # Uncomment if you have tasks that create the project's static files in wwwroot 28 | #wwwroot/ 29 | 30 | # MSTest test Results 31 | [Tt]est[Rr]esult*/ 32 | [Bb]uild[Ll]og.* 33 | 34 | # NUNIT 35 | *.VisualState.xml 36 | TestResult.xml 37 | 38 | # Build Results of an ATL Project 39 | [Dd]ebugPS/ 40 | [Rr]eleasePS/ 41 | dlldata.c 42 | 43 | # DNX 44 | project.lock.json 45 | artifacts/ 46 | 47 | *_i.c 48 | *_p.c 49 | *_i.h 50 | *.ilk 51 | *.meta 52 | *.obj 53 | *.pch 54 | *.pdb 55 | *.pgc 56 | *.pgd 57 | *.rsp 58 | *.sbr 59 | *.tlb 60 | *.tli 61 | *.tlh 62 | *.tmp 63 | *.tmp_proj 64 | *.log 65 | *.vspscc 66 | *.vssscc 67 | .builds 68 | *.pidb 69 | *.svclog 70 | *.scc 71 | 72 | # Chutzpah Test files 73 | _Chutzpah* 74 | 75 | # Visual C++ cache files 76 | ipch/ 77 | *.aps 78 | *.ncb 79 | *.opendb 80 | *.opensdf 81 | *.sdf 82 | *.cachefile 83 | *.VC.db 84 | 85 | # Visual Studio profiler 86 | *.psess 87 | *.vsp 88 | *.vspx 89 | *.sap 90 | 91 | # TFS 2012 Local Workspace 92 | $tf/ 93 | 94 | # Guidance Automation Toolkit 95 | *.gpState 96 | 97 | # ReSharper is a .NET coding add-in 98 | _ReSharper*/ 99 | *.[Rr]e[Ss]harper 100 | *.DotSettings.user 101 | 102 | # JustCode is a .NET coding add-in 103 | .JustCode 104 | 105 | # TeamCity is a build add-in 106 | _TeamCity* 107 | 108 | # DotCover is a Code Coverage Tool 109 | *.dotCover 110 | 111 | # NCrunch 112 | _NCrunch_* 113 | .*crunch*.local.xml 114 | nCrunchTemp_* 115 | 116 | # MightyMoose 117 | *.mm.* 118 | AutoTest.Net/ 119 | 120 | # Web workbench (sass) 121 | .sass-cache/ 122 | 123 | # Installshield output folder 124 | [Ee]xpress/ 125 | 126 | # DocProject is a documentation generator add-in 127 | DocProject/buildhelp/ 128 | DocProject/Help/*.HxT 129 | DocProject/Help/*.HxC 130 | DocProject/Help/*.hhc 131 | DocProject/Help/*.hhk 132 | DocProject/Help/*.hhp 133 | DocProject/Help/Html2 134 | DocProject/Help/html 135 | 136 | # Click-Once directory 137 | publish/ 138 | 139 | # Publish Web Output 140 | *.[Pp]ublish.xml 141 | *.azurePubxml 142 | 143 | # TODO: Un-comment the next line if you do not want to checkin 144 | # your web deploy settings because they may include unencrypted 145 | # passwords 146 | #*.pubxml 147 | *.publishproj 148 | 149 | # NuGet Packages 150 | *.nupkg 151 | # The packages folder can be ignored because of Package Restore 152 | **/packages/* 153 | # except build/, which is used as an MSBuild target. 154 | !**/packages/build/ 155 | # Uncomment if necessary however generally it will be regenerated when needed 156 | #!**/packages/repositories.config 157 | # NuGet v3's project.json files produces more ignoreable files 158 | *.nuget.props 159 | *.nuget.targets 160 | 161 | # Microsoft Azure Build Output 162 | csx/ 163 | *.build.csdef 164 | 165 | # Microsoft Azure Emulator 166 | ecf/ 167 | rcf/ 168 | 169 | # Windows Store app package directory 170 | AppPackages/ 171 | BundleArtifacts/ 172 | 173 | # Visual Studio cache files 174 | # files ending in .cache can be ignored 175 | *.[Cc]ache 176 | # but keep track of directories ending in .cache 177 | !*.[Cc]ache/ 178 | 179 | # Others 180 | ClientBin/ 181 | [Ss]tyle[Cc]op.* 182 | ~$* 183 | *~ 184 | *.dbmdl 185 | *.dbproj.schemaview 186 | *.pfx 187 | *.publishsettings 188 | node_modules/ 189 | orleans.codegen.cs 190 | 191 | # RIA/Silverlight projects 192 | Generated_Code/ 193 | 194 | # Backup & report files from converting an old project file 195 | # to a newer Visual Studio version. Backup files are not needed, 196 | # because we have git ;-) 197 | _UpgradeReport_Files/ 198 | Backup*/ 199 | UpgradeLog*.XML 200 | UpgradeLog*.htm 201 | 202 | # SQL Server files 203 | *.mdf 204 | *.ldf 205 | 206 | # Business Intelligence projects 207 | *.rdl.data 208 | *.bim.layout 209 | *.bim_*.settings 210 | 211 | # Microsoft Fakes 212 | FakesAssemblies/ 213 | 214 | # GhostDoc plugin setting file 215 | *.GhostDoc.xml 216 | 217 | # Node.js Tools for Visual Studio 218 | .ntvs_analysis.dat 219 | 220 | # Visual Studio 6 build log 221 | *.plg 222 | 223 | # Visual Studio 6 workspace options file 224 | *.opt 225 | 226 | # Visual Studio LightSwitch build output 227 | **/*.HTMLClient/GeneratedArtifacts 228 | **/*.DesktopClient/GeneratedArtifacts 229 | **/*.DesktopClient/ModelManifest.xml 230 | **/*.Server/GeneratedArtifacts 231 | **/*.Server/ModelManifest.xml 232 | _Pvt_Extensions 233 | 234 | # LightSwitch generated files 235 | GeneratedArtifacts/ 236 | ModelManifest.xml 237 | 238 | # Paket dependency manager 239 | .paket/paket.exe 240 | 241 | # FAKE - F# Make 242 | .fake/ 243 | -------------------------------------------------------------------------------- /CoreWebAPIAndAngular.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.25420.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{97E28DB5-55D2-44D1-A43C-915E34837B2A}" 7 | EndProject 8 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3F158CFA-CE44-42DE-A254-9B954128EB7F}" 9 | ProjectSection(SolutionItems) = preProject 10 | global.json = global.json 11 | EndProjectSection 12 | EndProject 13 | Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "CoreWebAPIAndAngular", "src\CoreWebAPIAndAngular\CoreWebAPIAndAngular.xproj", "{4CDB1BFF-091A-46A5-ABFC-C627D1B7E2F6}" 14 | EndProject 15 | Global 16 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 17 | Debug|Any CPU = Debug|Any CPU 18 | Release|Any CPU = Release|Any CPU 19 | EndGlobalSection 20 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 21 | {4CDB1BFF-091A-46A5-ABFC-C627D1B7E2F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 22 | {4CDB1BFF-091A-46A5-ABFC-C627D1B7E2F6}.Debug|Any CPU.Build.0 = Debug|Any CPU 23 | {4CDB1BFF-091A-46A5-ABFC-C627D1B7E2F6}.Release|Any CPU.ActiveCfg = Release|Any CPU 24 | {4CDB1BFF-091A-46A5-ABFC-C627D1B7E2F6}.Release|Any CPU.Build.0 = Release|Any CPU 25 | EndGlobalSection 26 | GlobalSection(SolutionProperties) = preSolution 27 | HideSolutionNode = FALSE 28 | EndGlobalSection 29 | GlobalSection(NestedProjects) = preSolution 30 | {4CDB1BFF-091A-46A5-ABFC-C627D1B7E2F6} = {97E28DB5-55D2-44D1-A43C-915E34837B2A} 31 | EndGlobalSection 32 | EndGlobal 33 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ASP.NET Core Web API and Angular 2 Http Demo 2 | 3 | Demonstration of using ASP.NET Core Web API features with Angular 2 4 | 5 | 6 | ## Running the Application 7 | 8 | 1. Install [Node.js](http://nodejs.org) 9 | 10 | 1. Navigate to the `src` folder in a command window 11 | 12 | 1. Run `npm install` to install Angular 2 dependencies 13 | 14 | 1. Run `npm run tsc:w` to compile Angular 2 TypeScript code to ES5 and watch for changes 15 | 16 | 1. Open the .sln file at the root of the project in Visual Studio. 17 | 18 | Note: VS can install npm dependencies but I prefer to do it as a separate step. 19 | -------------------------------------------------------------------------------- /global.json: -------------------------------------------------------------------------------- 1 | { 2 | "projects": [ "src", "test" ], 3 | "sdk": { 4 | "version": "1.0.0-preview2-003131" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log 3 | src/app/**/*.js 4 | src/app/**/*.js.map 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/Controllers/CustomersController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using CoreWebAPIAndAngular.Model; 7 | using CoreWebAPIAndAngular.Repository; 8 | 9 | namespace CoreWebAPIAndAngular.Controllers 10 | { 11 | [Route("api/[controller]")] 12 | public class CustomersController : Controller 13 | { 14 | List _customers; 15 | 16 | public CustomersController(ICustomersRepository repo) 17 | { 18 | _customers = repo.Customers; 19 | } 20 | 21 | // GET api/customers 22 | //[HttpGet] 23 | [ProducesResponseType(typeof(List), 200)] 24 | [ProducesResponseType(typeof(List), 404)] 25 | public ActionResult Get() 26 | { 27 | if (_customers == null) 28 | { 29 | return NotFound("No customers found!"); 30 | } 31 | return Ok(_customers); 32 | } 33 | 34 | // GET api/customers/1 35 | [HttpGet("{id}", Name = "GetCustomerRoute")] 36 | [ProducesResponseType(typeof(Customer), 200)] 37 | [ProducesResponseType(typeof(Customer), 404)] 38 | public ActionResult Get(int id) 39 | { 40 | var cust = _customers.Where(c => c.Id == id).SingleOrDefault(); 41 | if (cust == null) 42 | { 43 | return NotFound("Customer not found!"); 44 | } 45 | return Ok(cust); 46 | } 47 | 48 | // POST api/customers 49 | [HttpPost] 50 | [ProducesResponseType(typeof(Customer), 201)] 51 | [ProducesResponseType(typeof(Customer), 400)] 52 | public ActionResult Post([FromBody]Customer postedCustomer) 53 | { 54 | if (postedCustomer == null || !ModelState.IsValid) 55 | { 56 | return BadRequest("Customer is invalid.!"); 57 | } 58 | 59 | //Create a fake id for posted customer 60 | var maxId = _customers.Max(c => c.Id); 61 | var newId = ++maxId; 62 | postedCustomer.Id = newId; 63 | _customers.Add(postedCustomer); 64 | 65 | return CreatedAtRoute("GetCustomerRoute", 66 | new { id = postedCustomer.Id }, postedCustomer); 67 | } 68 | 69 | // PUT api/customers/5 70 | [HttpPut("{id}")] 71 | [ProducesResponseType(typeof(Customer), 200)] 72 | [ProducesResponseType(typeof(Customer), 404)] 73 | [ProducesResponseType(typeof(Customer), 400)] 74 | public ActionResult Put(int id, [FromBody]Customer putCustomer) 75 | { 76 | if (!ModelState.IsValid) 77 | { 78 | return BadRequest(this.ModelState); 79 | } 80 | 81 | var cust = _customers.Where(c => c.Id == id).SingleOrDefault(); 82 | if (cust == null) 83 | { 84 | return NotFound("Unable to update customer - not found!"); 85 | } 86 | cust.FirstName = putCustomer.FirstName; 87 | cust.LastName = putCustomer.LastName; 88 | return Ok(cust); 89 | } 90 | 91 | // DELETE api/customers/5 92 | [HttpDelete("{id}")] 93 | [ProducesResponseType(typeof(Customer), 200)] 94 | [ProducesResponseType(typeof(Customer), 404)] 95 | public ActionResult Delete(int id) 96 | { 97 | var cust = _customers.Where(c => c.Id == id).SingleOrDefault(); 98 | 99 | if (cust == null) 100 | { 101 | return NotFound("Unable to delete customer - not found!"); 102 | } 103 | 104 | _customers.Remove(cust); 105 | return Ok($"Customer {id} Deleted"); 106 | } 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | 7 | namespace CoreWebAPIAndAngular.Controllers 8 | { 9 | public class HomeController : Controller 10 | { 11 | public ActionResult Index() 12 | { 13 | return View(); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/CoreWebAPIAndAngular.xproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 4cdb1bff-091a-46a5-abfc-c627d1b7e2f6 10 | CoreWebAPIAndAngular 11 | .\obj 12 | .\bin\ 13 | v4.5.2 14 | 15 | 16 | 2.0 17 | /subscriptions/9fdf22bd-28e8-4f7a-bd6f-139722bc9a4e/resourcegroups/Default-ApplicationInsights-CentralUS/providers/microsoft.insights/components/CoreWebAPIAndAngular 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/Model/Address.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace CoreWebAPIAndAngular.Model 7 | { 8 | public class Address 9 | { 10 | public int Id { get; set; } 11 | public string City { get; set; } 12 | public string State { get; set; } 13 | public int Zip { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/Model/Customer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace CoreWebAPIAndAngular.Model 7 | { 8 | public class Customer 9 | { 10 | public int Id { get; set; } 11 | public string FirstName { get; set; } 12 | public string LastName { get; set; } 13 | public Address Address { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore.Hosting; 7 | using Microsoft.AspNetCore.Builder; 8 | 9 | namespace CoreWebAPIAndAngular 10 | { 11 | public class Program 12 | { 13 | public static void Main(string[] args) 14 | { 15 | var host = new WebHostBuilder() 16 | .UseKestrel() 17 | .UseContentRoot(Directory.GetCurrentDirectory()) 18 | .UseIISIntegration() 19 | .UseStartup() 20 | .Build(); 21 | 22 | host.Run(); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:57000", 7 | "sslPort": 0 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "launchUrl": "", 15 | "environmentVariables": { 16 | "ASPNETCORE_ENVIRONMENT": "Development" 17 | } 18 | }, 19 | "CoreWebAPIAndAngular": { 20 | "commandName": "Project", 21 | "launchBrowser": true, 22 | "launchUrl": "http://localhost:5000/", 23 | "environmentVariables": { 24 | "ASPNETCORE_ENVIRONMENT": "Development" 25 | } 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/Repository/CustomersRepository.cs: -------------------------------------------------------------------------------- 1 | using CoreWebAPIAndAngular.Model; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | 7 | namespace CoreWebAPIAndAngular.Repository 8 | { 9 | //Fake Repository that's added as a Singleton in Startup.cs 10 | public class CustomersRepository : ICustomersRepository 11 | { 12 | //Cheap way to create a cache of data 13 | //Purely for demo! 14 | List _customers = new List 15 | { 16 | new Customer { Id = 1, FirstName="John", LastName="Doe", 17 | Address = new Address { Id=1, City="Chandler", State="AZ", Zip=85249 }}, 18 | new Customer { Id = 2, FirstName="Jane", LastName="Doe", 19 | Address = new Address { Id=2, City="Chandler", State="AZ", Zip=85249 }}, 20 | new Customer { Id = 3, FirstName="Tina", LastName="Smith", 21 | Address = new Address { Id=3, City="Redmond", State="WA", Zip=98052 }} 22 | }; 23 | 24 | public List Customers 25 | { 26 | get 27 | { 28 | return _customers; 29 | } 30 | } 31 | 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/Repository/ICustomersRepository.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using CoreWebAPIAndAngular.Model; 3 | 4 | namespace CoreWebAPIAndAngular.Repository 5 | { 6 | public interface ICustomersRepository 7 | { 8 | List Customers { get; } 9 | } 10 | } -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/Service References/Application Insights/ConnectedService.json: -------------------------------------------------------------------------------- 1 | { 2 | "ProviderId": "Microsoft.ApplicationInsights.ConnectedService.ConnectedServiceProvider", 3 | "Version": "7.7.10922.3", 4 | "GettingStartedDocument": { 5 | "Uri": "https://go.microsoft.com/fwlink/?LinkID=798432" 6 | } 7 | } -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/Startup.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Builder; 6 | using Microsoft.AspNetCore.Hosting; 7 | using Microsoft.Extensions.Configuration; 8 | using Microsoft.Extensions.DependencyInjection; 9 | using Microsoft.Extensions.Logging; 10 | using Microsoft.Extensions.FileProviders; 11 | using System.IO; 12 | using CoreWebAPIAndAngular.Repository; 13 | 14 | namespace CoreWebAPIAndAngular 15 | { 16 | public class Startup 17 | { 18 | public Startup(IHostingEnvironment env) 19 | { 20 | var builder = new ConfigurationBuilder() 21 | .SetBasePath(env.ContentRootPath) 22 | .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true) 23 | .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true); 24 | 25 | if (env.IsEnvironment("Development")) 26 | { 27 | // This will push telemetry data through Application Insights pipeline faster, allowing you to view results immediately. 28 | builder.AddApplicationInsightsSettings(developerMode: true); 29 | } 30 | 31 | builder.AddEnvironmentVariables(); 32 | Configuration = builder.Build(); 33 | } 34 | 35 | public IConfigurationRoot Configuration { get; } 36 | 37 | // This method gets called by the runtime. Use this method to add services to the container 38 | public void ConfigureServices(IServiceCollection services) 39 | { 40 | services.AddSingleton(); 41 | 42 | // Add framework services. 43 | services.AddApplicationInsightsTelemetry(Configuration); 44 | 45 | services.AddMvc(); 46 | } 47 | 48 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline 49 | public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) 50 | { 51 | loggerFactory.AddConsole(Configuration.GetSection("Logging")); 52 | loggerFactory.AddDebug(); 53 | 54 | app.UseApplicationInsightsRequestTelemetry(); 55 | 56 | app.UseApplicationInsightsExceptionTelemetry(); 57 | 58 | // Serve wwwroot as root 59 | app.UseFileServer(); 60 | 61 | // Serve /node_modules to simplify demo 62 | //(build task would normally copy in necessary scripts) 63 | app.UseFileServer(new FileServerOptions() 64 | { 65 | // Set root of file server 66 | FileProvider = new PhysicalFileProvider(Path.Combine(env.ContentRootPath, "node_modules")), 67 | RequestPath = "/node_modules", 68 | EnableDirectoryBrowsing = false 69 | }); 70 | 71 | app.UseMvc(routes => 72 | { 73 | routes.MapRoute( 74 | name: "default", 75 | template: "{controller=Home}/{action=Index}"); 76 | 77 | //Not needed but left in for reference when HTML5 routes are used by SPA 78 | //https://github.com/aspnet/JavaScriptServices/blob/dev/samples/angular/MusicStore/Startup.cs 79 | //routes.MapSpaFallbackRoute("spa-fallback", new { controller = "Home", action = "Index" }); 80 | 81 | }); 82 | } 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/Views/Home/Index.cshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 10 |
11 | 12 |
Loading... 13 |
14 |

15 |
-------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Error"; 3 | } 4 | 5 |

Error.

6 |

An error occurred while processing your request.

7 | -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/Views/Shared/_Layout.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | @ViewData["Title"] - Asp.Net Core Web API Angular 2 Demo 8 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | 30 |
31 | @RenderBody() 32 |
33 |
34 |

© 2016 - Wahlin Consulting

35 |
36 |
37 | 38 | 39 | 40 | 41 | 42 | @RenderSection("scripts", required: false) 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/Views/Shared/_LoginPartial.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Security.Claims 2 | 3 | @if (User.IsSignedIn()) 4 | { 5 | 15 | } 16 | else 17 | { 18 | 22 | } 23 | -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/Views/Shared/_ValidationScriptsPartial.cshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 10 | 14 | 15 | -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/Views/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using CoreWebAPIAndAngular 2 | @using CoreWebAPIAndAngular.Model 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | }, 10 | "ApplicationInsights": { 11 | "InstrumentationKey": "0d099770-b665-4dc2-bfcb-434ef54fb6ee" 12 | } 13 | } -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "aspnet_core_webapi_angular", 3 | "author": "Dan Wahlin", 4 | "version": "0.1.0", 5 | "scripts": { 6 | "postinstall": "typings install", 7 | "tsc": "tsc", 8 | "tsc:w": "tsc -w", 9 | "typings": "typings" 10 | }, 11 | "license": "ISC", 12 | "dependencies": { 13 | "@angular/common": "2.0.1", 14 | "@angular/compiler": "2.0.1", 15 | "@angular/core": "2.0.1", 16 | "@angular/forms": "2.0.1", 17 | "@angular/http": "2.0.1", 18 | "@angular/platform-browser": "2.0.1", 19 | "@angular/platform-browser-dynamic": "2.0.1", 20 | "@angular/router": "3.0.1", 21 | 22 | "systemjs": "0.19.39", 23 | "core-js": "^2.4.1", 24 | "reflect-metadata": "^0.1.8", 25 | "rxjs": "5.0.0-beta.12", 26 | "zone.js": "^0.6.25" 27 | }, 28 | "devDependencies": { 29 | "concurrently": "^2.2.0", 30 | "typescript": "2.0.3", 31 | "typings": "^1.4.0" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "Microsoft.NETCore.App": { 4 | "version": "1.0.1", 5 | "type": "platform" 6 | }, 7 | "Microsoft.ApplicationInsights.AspNetCore": "1.0.0", 8 | "Microsoft.AspNetCore.Mvc": "1.0.1", 9 | "Microsoft.AspNetCore.Routing": "1.0.1", 10 | "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0", 11 | "Microsoft.AspNetCore.Server.Kestrel": "1.0.1", 12 | "Microsoft.AspNetCore.StaticFiles": "1.0.0", 13 | "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0", 14 | "Microsoft.Extensions.Configuration.FileExtensions": "1.0.0", 15 | "Microsoft.Extensions.Configuration.Json": "1.0.0", 16 | "Microsoft.Extensions.Logging": "1.0.0", 17 | "Microsoft.Extensions.Logging.Console": "1.0.0", 18 | "Microsoft.Extensions.Logging.Debug": "1.0.0", 19 | "Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0", 20 | "Microsoft.AspNetCore.AngularServices": "1.0.0-beta-000016" 21 | }, 22 | 23 | "tools": { 24 | "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final" 25 | }, 26 | 27 | "frameworks": { 28 | "netcoreapp1.0": { 29 | "imports": [ 30 | "dotnet5.6", 31 | "portable-net45+win8" 32 | ] 33 | } 34 | }, 35 | 36 | "buildOptions": { 37 | "emitEntryPoint": true, 38 | "preserveCompilationContext": true 39 | }, 40 | 41 | "runtimeOptions": { 42 | "configProperties": { 43 | "System.GC.Server": true 44 | } 45 | }, 46 | 47 | "publishOptions": { 48 | "include": [ 49 | "wwwroot", 50 | "**/*.cshtml", 51 | "appsettings.json", 52 | "web.config" 53 | ] 54 | }, 55 | 56 | "scripts": { 57 | "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ] 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "module": "commonjs", 5 | "moduleResolution": "node", 6 | "sourceMap": true, 7 | "emitDecoratorMetadata": true, 8 | "experimentalDecorators": true, 9 | "removeComments": false, 10 | "noImplicitAny": true, 11 | "suppressImplicitAnyIndexErrors": true 12 | }, 13 | "exclude": [ 14 | "node_modules", 15 | "typings/main", 16 | "typings/main.d.ts" 17 | ] 18 | } -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/typings.json: -------------------------------------------------------------------------------- 1 | { 2 | "globalDependencies": { 3 | "core-js": "registry:dt/core-js#0.0.0+20160725163759" 4 | } 5 | } -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/typings/globals/core-js/index.d.ts: -------------------------------------------------------------------------------- 1 | // Generated by typings 2 | // Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/25e18b592470e3dddccc826fde2bb8e7610ef863/core-js/core-js.d.ts 3 | declare type PropertyKey = string | number | symbol; 4 | 5 | // ############################################################################################# 6 | // ECMAScript 6: Object & Function 7 | // Modules: es6.object.assign, es6.object.is, es6.object.set-prototype-of, 8 | // es6.object.to-string, es6.function.name and es6.function.has-instance. 9 | // ############################################################################################# 10 | 11 | interface ObjectConstructor { 12 | /** 13 | * Copy the values of all of the enumerable own properties from one or more source objects to a 14 | * target object. Returns the target object. 15 | * @param target The target object to copy to. 16 | * @param source The source object from which to copy properties. 17 | */ 18 | assign(target: T, source: U): T & U; 19 | 20 | /** 21 | * Copy the values of all of the enumerable own properties from one or more source objects to a 22 | * target object. Returns the target object. 23 | * @param target The target object to copy to. 24 | * @param source1 The first source object from which to copy properties. 25 | * @param source2 The second source object from which to copy properties. 26 | */ 27 | assign(target: T, source1: U, source2: V): T & U & V; 28 | 29 | /** 30 | * Copy the values of all of the enumerable own properties from one or more source objects to a 31 | * target object. Returns the target object. 32 | * @param target The target object to copy to. 33 | * @param source1 The first source object from which to copy properties. 34 | * @param source2 The second source object from which to copy properties. 35 | * @param source3 The third source object from which to copy properties. 36 | */ 37 | assign(target: T, source1: U, source2: V, source3: W): T & U & V & W; 38 | 39 | /** 40 | * Copy the values of all of the enumerable own properties from one or more source objects to a 41 | * target object. Returns the target object. 42 | * @param target The target object to copy to. 43 | * @param sources One or more source objects from which to copy properties 44 | */ 45 | assign(target: any, ...sources: any[]): any; 46 | 47 | /** 48 | * Returns true if the values are the same value, false otherwise. 49 | * @param value1 The first value. 50 | * @param value2 The second value. 51 | */ 52 | is(value1: any, value2: any): boolean; 53 | 54 | /** 55 | * Sets the prototype of a specified object o to object proto or null. Returns the object o. 56 | * @param o The object to change its prototype. 57 | * @param proto The value of the new prototype or null. 58 | * @remarks Requires `__proto__` support. 59 | */ 60 | setPrototypeOf(o: any, proto: any): any; 61 | } 62 | 63 | interface Function { 64 | /** 65 | * Returns the name of the function. Function names are read-only and can not be changed. 66 | */ 67 | name: string; 68 | 69 | /** 70 | * Determines if a constructor object recognizes an object as one of the 71 | * constructor’s instances. 72 | * @param value The object to test. 73 | */ 74 | [Symbol.hasInstance](value: any): boolean; 75 | } 76 | 77 | // ############################################################################################# 78 | // ECMAScript 6: Array 79 | // Modules: es6.array.from, es6.array.of, es6.array.copy-within, es6.array.fill, es6.array.find, 80 | // and es6.array.find-index 81 | // ############################################################################################# 82 | 83 | interface Array { 84 | /** 85 | * Returns the value of the first element in the array where predicate is true, and undefined 86 | * otherwise. 87 | * @param predicate find calls predicate once for each element of the array, in ascending 88 | * order, until it finds one where predicate returns true. If such an element is found, find 89 | * immediately returns that element value. Otherwise, find returns undefined. 90 | * @param thisArg If provided, it will be used as the this value for each invocation of 91 | * predicate. If it is not provided, undefined is used instead. 92 | */ 93 | find(predicate: (value: T, index: number, obj: Array) => boolean, thisArg?: any): T; 94 | 95 | /** 96 | * Returns the index of the first element in the array where predicate is true, and undefined 97 | * otherwise. 98 | * @param predicate find calls predicate once for each element of the array, in ascending 99 | * order, until it finds one where predicate returns true. If such an element is found, find 100 | * immediately returns that element value. Otherwise, find returns undefined. 101 | * @param thisArg If provided, it will be used as the this value for each invocation of 102 | * predicate. If it is not provided, undefined is used instead. 103 | */ 104 | findIndex(predicate: (value: T) => boolean, thisArg?: any): number; 105 | 106 | /** 107 | * Returns the this object after filling the section identified by start and end with value 108 | * @param value value to fill array section with 109 | * @param start index to start filling the array at. If start is negative, it is treated as 110 | * length+start where length is the length of the array. 111 | * @param end index to stop filling the array at. If end is negative, it is treated as 112 | * length+end. 113 | */ 114 | fill(value: T, start?: number, end?: number): T[]; 115 | 116 | /** 117 | * Returns the this object after copying a section of the array identified by start and end 118 | * to the same array starting at position target 119 | * @param target If target is negative, it is treated as length+target where length is the 120 | * length of the array. 121 | * @param start If start is negative, it is treated as length+start. If end is negative, it 122 | * is treated as length+end. 123 | * @param end If not specified, length of the this object is used as its default value. 124 | */ 125 | copyWithin(target: number, start: number, end?: number): T[]; 126 | 127 | [Symbol.unscopables]: any; 128 | } 129 | 130 | interface ArrayConstructor { 131 | /** 132 | * Creates an array from an array-like object. 133 | * @param arrayLike An array-like object to convert to an array. 134 | * @param mapfn A mapping function to call on every element of the array. 135 | * @param thisArg Value of 'this' used to invoke the mapfn. 136 | */ 137 | from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): Array; 138 | 139 | /** 140 | * Creates an array from an iterable object. 141 | * @param iterable An iterable object to convert to an array. 142 | * @param mapfn A mapping function to call on every element of the array. 143 | * @param thisArg Value of 'this' used to invoke the mapfn. 144 | */ 145 | from(iterable: Iterable, mapfn: (v: T, k: number) => U, thisArg?: any): Array; 146 | 147 | /** 148 | * Creates an array from an array-like object. 149 | * @param arrayLike An array-like object to convert to an array. 150 | */ 151 | from(arrayLike: ArrayLike): Array; 152 | 153 | /** 154 | * Creates an array from an iterable object. 155 | * @param iterable An iterable object to convert to an array. 156 | */ 157 | from(iterable: Iterable): Array; 158 | 159 | /** 160 | * Returns a new array from a set of elements. 161 | * @param items A set of elements to include in the new array object. 162 | */ 163 | of(...items: T[]): Array; 164 | } 165 | 166 | // ############################################################################################# 167 | // ECMAScript 6: String & RegExp 168 | // Modules: es6.string.from-code-point, es6.string.raw, es6.string.code-point-at, 169 | // es6.string.ends-with, es6.string.includes, es6.string.repeat, 170 | // es6.string.starts-with, and es6.regexp 171 | // ############################################################################################# 172 | 173 | interface String { 174 | /** 175 | * Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point 176 | * value of the UTF-16 encoded code point starting at the string element at position pos in 177 | * the String resulting from converting this object to a String. 178 | * If there is no element at that position, the result is undefined. 179 | * If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos. 180 | */ 181 | codePointAt(pos: number): number; 182 | 183 | /** 184 | * Returns true if searchString appears as a substring of the result of converting this 185 | * object to a String, at one or more positions that are 186 | * greater than or equal to position; otherwise, returns false. 187 | * @param searchString search string 188 | * @param position If position is undefined, 0 is assumed, so as to search all of the String. 189 | */ 190 | includes(searchString: string, position?: number): boolean; 191 | 192 | /** 193 | * Returns true if the sequence of elements of searchString converted to a String is the 194 | * same as the corresponding elements of this object (converted to a String) starting at 195 | * endPosition – length(this). Otherwise returns false. 196 | */ 197 | endsWith(searchString: string, endPosition?: number): boolean; 198 | 199 | /** 200 | * Returns a String value that is made from count copies appended together. If count is 0, 201 | * T is the empty String is returned. 202 | * @param count number of copies to append 203 | */ 204 | repeat(count: number): string; 205 | 206 | /** 207 | * Returns true if the sequence of elements of searchString converted to a String is the 208 | * same as the corresponding elements of this object (converted to a String) starting at 209 | * position. Otherwise returns false. 210 | */ 211 | startsWith(searchString: string, position?: number): boolean; 212 | } 213 | 214 | interface StringConstructor { 215 | /** 216 | * Return the String value whose elements are, in order, the elements in the List elements. 217 | * If length is 0, the empty string is returned. 218 | */ 219 | fromCodePoint(...codePoints: number[]): string; 220 | 221 | /** 222 | * String.raw is intended for use as a tag function of a Tagged Template String. When called 223 | * as such the first argument will be a well formed template call site object and the rest 224 | * parameter will contain the substitution values. 225 | * @param template A well-formed template string call site representation. 226 | * @param substitutions A set of substitution values. 227 | */ 228 | raw(template: TemplateStringsArray, ...substitutions: any[]): string; 229 | } 230 | 231 | interface RegExp { 232 | /** 233 | * Returns a string indicating the flags of the regular expression in question. This field is read-only. 234 | * The characters in this string are sequenced and concatenated in the following order: 235 | * 236 | * - "g" for global 237 | * - "i" for ignoreCase 238 | * - "m" for multiline 239 | * - "u" for unicode 240 | * - "y" for sticky 241 | * 242 | * If no flags are set, the value is the empty string. 243 | */ 244 | flags: string; 245 | } 246 | 247 | // ############################################################################################# 248 | // ECMAScript 6: Number & Math 249 | // Modules: es6.number.constructor, es6.number.statics, and es6.math 250 | // ############################################################################################# 251 | 252 | interface NumberConstructor { 253 | /** 254 | * The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1 255 | * that is representable as a Number value, which is approximately: 256 | * 2.2204460492503130808472633361816 x 10‍−‍16. 257 | */ 258 | EPSILON: number; 259 | 260 | /** 261 | * Returns true if passed value is finite. 262 | * Unlike the global isFininte, Number.isFinite doesn't forcibly convert the parameter to a 263 | * number. Only finite values of the type number, result in true. 264 | * @param number A numeric value. 265 | */ 266 | isFinite(number: number): boolean; 267 | 268 | /** 269 | * Returns true if the value passed is an integer, false otherwise. 270 | * @param number A numeric value. 271 | */ 272 | isInteger(number: number): boolean; 273 | 274 | /** 275 | * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a 276 | * number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter 277 | * to a number. Only values of the type number, that are also NaN, result in true. 278 | * @param number A numeric value. 279 | */ 280 | isNaN(number: number): boolean; 281 | 282 | /** 283 | * Returns true if the value passed is a safe integer. 284 | * @param number A numeric value. 285 | */ 286 | isSafeInteger(number: number): boolean; 287 | 288 | /** 289 | * The value of the largest integer n such that n and n + 1 are both exactly representable as 290 | * a Number value. 291 | * The value of Number.MIN_SAFE_INTEGER is 9007199254740991 2^53 − 1. 292 | */ 293 | MAX_SAFE_INTEGER: number; 294 | 295 | /** 296 | * The value of the smallest integer n such that n and n − 1 are both exactly representable as 297 | * a Number value. 298 | * The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)). 299 | */ 300 | MIN_SAFE_INTEGER: number; 301 | 302 | /** 303 | * Converts a string to a floating-point number. 304 | * @param string A string that contains a floating-point number. 305 | */ 306 | parseFloat(string: string): number; 307 | 308 | /** 309 | * Converts A string to an integer. 310 | * @param s A string to convert into a number. 311 | * @param radix A value between 2 and 36 that specifies the base of the number in numString. 312 | * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal. 313 | * All other strings are considered decimal. 314 | */ 315 | parseInt(string: string, radix?: number): number; 316 | } 317 | 318 | interface Math { 319 | /** 320 | * Returns the number of leading zero bits in the 32-bit binary representation of a number. 321 | * @param x A numeric expression. 322 | */ 323 | clz32(x: number): number; 324 | 325 | /** 326 | * Returns the result of 32-bit multiplication of two numbers. 327 | * @param x First number 328 | * @param y Second number 329 | */ 330 | imul(x: number, y: number): number; 331 | 332 | /** 333 | * Returns the sign of the x, indicating whether x is positive, negative or zero. 334 | * @param x The numeric expression to test 335 | */ 336 | sign(x: number): number; 337 | 338 | /** 339 | * Returns the base 10 logarithm of a number. 340 | * @param x A numeric expression. 341 | */ 342 | log10(x: number): number; 343 | 344 | /** 345 | * Returns the base 2 logarithm of a number. 346 | * @param x A numeric expression. 347 | */ 348 | log2(x: number): number; 349 | 350 | /** 351 | * Returns the natural logarithm of 1 + x. 352 | * @param x A numeric expression. 353 | */ 354 | log1p(x: number): number; 355 | 356 | /** 357 | * Returns the result of (e^x - 1) of x (e raised to the power of x, where e is the base of 358 | * the natural logarithms). 359 | * @param x A numeric expression. 360 | */ 361 | expm1(x: number): number; 362 | 363 | /** 364 | * Returns the hyperbolic cosine of a number. 365 | * @param x A numeric expression that contains an angle measured in radians. 366 | */ 367 | cosh(x: number): number; 368 | 369 | /** 370 | * Returns the hyperbolic sine of a number. 371 | * @param x A numeric expression that contains an angle measured in radians. 372 | */ 373 | sinh(x: number): number; 374 | 375 | /** 376 | * Returns the hyperbolic tangent of a number. 377 | * @param x A numeric expression that contains an angle measured in radians. 378 | */ 379 | tanh(x: number): number; 380 | 381 | /** 382 | * Returns the inverse hyperbolic cosine of a number. 383 | * @param x A numeric expression that contains an angle measured in radians. 384 | */ 385 | acosh(x: number): number; 386 | 387 | /** 388 | * Returns the inverse hyperbolic sine of a number. 389 | * @param x A numeric expression that contains an angle measured in radians. 390 | */ 391 | asinh(x: number): number; 392 | 393 | /** 394 | * Returns the inverse hyperbolic tangent of a number. 395 | * @param x A numeric expression that contains an angle measured in radians. 396 | */ 397 | atanh(x: number): number; 398 | 399 | /** 400 | * Returns the square root of the sum of squares of its arguments. 401 | * @param values Values to compute the square root for. 402 | * If no arguments are passed, the result is +0. 403 | * If there is only one argument, the result is the absolute value. 404 | * If any argument is +Infinity or -Infinity, the result is +Infinity. 405 | * If any argument is NaN, the result is NaN. 406 | * If all arguments are either +0 or −0, the result is +0. 407 | */ 408 | hypot(...values: number[]): number; 409 | 410 | /** 411 | * Returns the integral part of the a numeric expression, x, removing any fractional digits. 412 | * If x is already an integer, the result is x. 413 | * @param x A numeric expression. 414 | */ 415 | trunc(x: number): number; 416 | 417 | /** 418 | * Returns the nearest single precision float representation of a number. 419 | * @param x A numeric expression. 420 | */ 421 | fround(x: number): number; 422 | 423 | /** 424 | * Returns an implementation-dependent approximation to the cube root of number. 425 | * @param x A numeric expression. 426 | */ 427 | cbrt(x: number): number; 428 | } 429 | 430 | // ############################################################################################# 431 | // ECMAScript 6: Symbols 432 | // Modules: es6.symbol 433 | // ############################################################################################# 434 | 435 | interface Symbol { 436 | /** Returns a string representation of an object. */ 437 | toString(): string; 438 | 439 | [Symbol.toStringTag]: string; 440 | } 441 | 442 | interface SymbolConstructor { 443 | /** 444 | * A reference to the prototype. 445 | */ 446 | prototype: Symbol; 447 | 448 | /** 449 | * Returns a new unique Symbol value. 450 | * @param description Description of the new Symbol object. 451 | */ 452 | (description?: string|number): symbol; 453 | 454 | /** 455 | * Returns a Symbol object from the global symbol registry matching the given key if found. 456 | * Otherwise, returns a new symbol with this key. 457 | * @param key key to search for. 458 | */ 459 | for(key: string): symbol; 460 | 461 | /** 462 | * Returns a key from the global symbol registry matching the given Symbol if found. 463 | * Otherwise, returns a undefined. 464 | * @param sym Symbol to find the key for. 465 | */ 466 | keyFor(sym: symbol): string; 467 | 468 | // Well-known Symbols 469 | 470 | /** 471 | * A method that determines if a constructor object recognizes an object as one of the 472 | * constructor’s instances. Called by the semantics of the instanceof operator. 473 | */ 474 | hasInstance: symbol; 475 | 476 | /** 477 | * A Boolean value that if true indicates that an object should flatten to its array elements 478 | * by Array.prototype.concat. 479 | */ 480 | isConcatSpreadable: symbol; 481 | 482 | /** 483 | * A method that returns the default iterator for an object. Called by the semantics of the 484 | * for-of statement. 485 | */ 486 | iterator: symbol; 487 | 488 | /** 489 | * A regular expression method that matches the regular expression against a string. Called 490 | * by the String.prototype.match method. 491 | */ 492 | match: symbol; 493 | 494 | /** 495 | * A regular expression method that replaces matched substrings of a string. Called by the 496 | * String.prototype.replace method. 497 | */ 498 | replace: symbol; 499 | 500 | /** 501 | * A regular expression method that returns the index within a string that matches the 502 | * regular expression. Called by the String.prototype.search method. 503 | */ 504 | search: symbol; 505 | 506 | /** 507 | * A function valued property that is the constructor function that is used to create 508 | * derived objects. 509 | */ 510 | species: symbol; 511 | 512 | /** 513 | * A regular expression method that splits a string at the indices that match the regular 514 | * expression. Called by the String.prototype.split method. 515 | */ 516 | split: symbol; 517 | 518 | /** 519 | * A method that converts an object to a corresponding primitive value.Called by the ToPrimitive 520 | * abstract operation. 521 | */ 522 | toPrimitive: symbol; 523 | 524 | /** 525 | * A String value that is used in the creation of the default string description of an object. 526 | * Called by the built-in method Object.prototype.toString. 527 | */ 528 | toStringTag: symbol; 529 | 530 | /** 531 | * An Object whose own property names are property names that are excluded from the with 532 | * environment bindings of the associated objects. 533 | */ 534 | unscopables: symbol; 535 | 536 | /** 537 | * Non-standard. Use simple mode for core-js symbols. See https://github.com/zloirock/core-js/#caveats-when-using-symbol-polyfill 538 | */ 539 | useSimple(): void; 540 | 541 | /** 542 | * Non-standard. Use setter mode for core-js symbols. See https://github.com/zloirock/core-js/#caveats-when-using-symbol-polyfill 543 | */ 544 | userSetter(): void; 545 | } 546 | 547 | declare var Symbol: SymbolConstructor; 548 | 549 | interface Object { 550 | /** 551 | * Determines whether an object has a property with the specified name. 552 | * @param v A property name. 553 | */ 554 | hasOwnProperty(v: PropertyKey): boolean; 555 | 556 | /** 557 | * Determines whether a specified property is enumerable. 558 | * @param v A property name. 559 | */ 560 | propertyIsEnumerable(v: PropertyKey): boolean; 561 | } 562 | 563 | interface ObjectConstructor { 564 | /** 565 | * Returns an array of all symbol properties found directly on object o. 566 | * @param o Object to retrieve the symbols from. 567 | */ 568 | getOwnPropertySymbols(o: any): symbol[]; 569 | 570 | /** 571 | * Gets the own property descriptor of the specified object. 572 | * An own property descriptor is one that is defined directly on the object and is not 573 | * inherited from the object's prototype. 574 | * @param o Object that contains the property. 575 | * @param p Name of the property. 576 | */ 577 | getOwnPropertyDescriptor(o: any, propertyKey: PropertyKey): PropertyDescriptor; 578 | 579 | /** 580 | * Adds a property to an object, or modifies attributes of an existing property. 581 | * @param o Object on which to add or modify the property. This can be a native JavaScript 582 | * object (that is, a user-defined object or a built in object) or a DOM object. 583 | * @param p The property name. 584 | * @param attributes Descriptor for the property. It can be for a data property or an accessor 585 | * property. 586 | */ 587 | defineProperty(o: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): any; 588 | } 589 | 590 | interface Math { 591 | [Symbol.toStringTag]: string; 592 | } 593 | 594 | interface JSON { 595 | [Symbol.toStringTag]: string; 596 | } 597 | 598 | // ############################################################################################# 599 | // ECMAScript 6: Collections 600 | // Modules: es6.map, es6.set, es6.weak-map, and es6.weak-set 601 | // ############################################################################################# 602 | 603 | interface Map { 604 | clear(): void; 605 | delete(key: K): boolean; 606 | forEach(callbackfn: (value: V, index: K, map: Map) => void, thisArg?: any): void; 607 | get(key: K): V; 608 | has(key: K): boolean; 609 | set(key: K, value?: V): Map; 610 | size: number; 611 | } 612 | 613 | interface MapConstructor { 614 | new (): Map; 615 | new (iterable: Iterable<[K, V]>): Map; 616 | prototype: Map; 617 | } 618 | 619 | declare var Map: MapConstructor; 620 | 621 | interface Set { 622 | add(value: T): Set; 623 | clear(): void; 624 | delete(value: T): boolean; 625 | forEach(callbackfn: (value: T, index: T, set: Set) => void, thisArg?: any): void; 626 | has(value: T): boolean; 627 | size: number; 628 | } 629 | 630 | interface SetConstructor { 631 | new (): Set; 632 | new (iterable: Iterable): Set; 633 | prototype: Set; 634 | } 635 | 636 | declare var Set: SetConstructor; 637 | 638 | interface WeakMap { 639 | delete(key: K): boolean; 640 | get(key: K): V; 641 | has(key: K): boolean; 642 | set(key: K, value?: V): WeakMap; 643 | } 644 | 645 | interface WeakMapConstructor { 646 | new (): WeakMap; 647 | new (iterable: Iterable<[K, V]>): WeakMap; 648 | prototype: WeakMap; 649 | } 650 | 651 | declare var WeakMap: WeakMapConstructor; 652 | 653 | interface WeakSet { 654 | add(value: T): WeakSet; 655 | delete(value: T): boolean; 656 | has(value: T): boolean; 657 | } 658 | 659 | interface WeakSetConstructor { 660 | new (): WeakSet; 661 | new (iterable: Iterable): WeakSet; 662 | prototype: WeakSet; 663 | } 664 | 665 | declare var WeakSet: WeakSetConstructor; 666 | 667 | // ############################################################################################# 668 | // ECMAScript 6: Iterators 669 | // Modules: es6.string.iterator, es6.array.iterator, es6.map, es6.set, web.dom.iterable 670 | // ############################################################################################# 671 | 672 | interface IteratorResult { 673 | done: boolean; 674 | value?: T; 675 | } 676 | 677 | interface Iterator { 678 | next(value?: any): IteratorResult; 679 | return?(value?: any): IteratorResult; 680 | throw?(e?: any): IteratorResult; 681 | } 682 | 683 | interface Iterable { 684 | [Symbol.iterator](): Iterator; 685 | } 686 | 687 | interface IterableIterator extends Iterator { 688 | [Symbol.iterator](): IterableIterator; 689 | } 690 | 691 | interface String { 692 | /** Iterator */ 693 | [Symbol.iterator](): IterableIterator; 694 | } 695 | 696 | interface Array { 697 | /** Iterator */ 698 | [Symbol.iterator](): IterableIterator; 699 | 700 | /** 701 | * Returns an array of key, value pairs for every entry in the array 702 | */ 703 | entries(): IterableIterator<[number, T]>; 704 | 705 | /** 706 | * Returns an list of keys in the array 707 | */ 708 | keys(): IterableIterator; 709 | 710 | /** 711 | * Returns an list of values in the array 712 | */ 713 | values(): IterableIterator; 714 | } 715 | 716 | interface Map { 717 | entries(): IterableIterator<[K, V]>; 718 | keys(): IterableIterator; 719 | values(): IterableIterator; 720 | [Symbol.iterator](): IterableIterator<[K, V]>; 721 | } 722 | 723 | interface Set { 724 | entries(): IterableIterator<[T, T]>; 725 | keys(): IterableIterator; 726 | values(): IterableIterator; 727 | [Symbol.iterator](): IterableIterator; 728 | } 729 | 730 | interface NodeList { 731 | [Symbol.iterator](): IterableIterator; 732 | } 733 | 734 | interface $for extends IterableIterator { 735 | of(callbackfn: (value: T, key: any) => void, thisArg?: any): void; 736 | array(): T[]; 737 | array(callbackfn: (value: T, key: any) => U, thisArg?: any): U[]; 738 | filter(callbackfn: (value: T, key: any) => boolean, thisArg?: any): $for; 739 | map(callbackfn: (value: T, key: any) => U, thisArg?: any): $for; 740 | } 741 | 742 | declare function $for(iterable: Iterable): $for; 743 | 744 | // ############################################################################################# 745 | // ECMAScript 6: Promises 746 | // Modules: es6.promise 747 | // ############################################################################################# 748 | 749 | interface PromiseLike { 750 | /** 751 | * Attaches callbacks for the resolution and/or rejection of the Promise. 752 | * @param onfulfilled The callback to execute when the Promise is resolved. 753 | * @param onrejected The callback to execute when the Promise is rejected. 754 | * @returns A Promise for the completion of which ever callback is executed. 755 | */ 756 | then(onfulfilled?: (value: T) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): PromiseLike; 757 | then(onfulfilled?: (value: T) => TResult | PromiseLike, onrejected?: (reason: any) => void): PromiseLike; 758 | } 759 | 760 | /** 761 | * Represents the completion of an asynchronous operation 762 | */ 763 | interface Promise { 764 | /** 765 | * Attaches callbacks for the resolution and/or rejection of the Promise. 766 | * @param onfulfilled The callback to execute when the Promise is resolved. 767 | * @param onrejected The callback to execute when the Promise is rejected. 768 | * @returns A Promise for the completion of which ever callback is executed. 769 | */ 770 | then(onfulfilled?: (value: T) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; 771 | then(onfulfilled?: (value: T) => TResult | PromiseLike, onrejected?: (reason: any) => void): Promise; 772 | 773 | /** 774 | * Attaches a callback for only the rejection of the Promise. 775 | * @param onrejected The callback to execute when the Promise is rejected. 776 | * @returns A Promise for the completion of the callback. 777 | */ 778 | catch(onrejected?: (reason: any) => T | PromiseLike): Promise; 779 | catch(onrejected?: (reason: any) => void): Promise; 780 | } 781 | 782 | interface PromiseConstructor { 783 | /** 784 | * A reference to the prototype. 785 | */ 786 | prototype: Promise; 787 | 788 | /** 789 | * Creates a new Promise. 790 | * @param executor A callback used to initialize the promise. This callback is passed two arguments: 791 | * a resolve callback used resolve the promise with a value or the result of another promise, 792 | * and a reject callback used to reject the promise with a provided reason or error. 793 | */ 794 | new (executor: (resolve: (value?: T | PromiseLike) => void, reject: (reason?: any) => void) => void): Promise; 795 | 796 | /** 797 | * Creates a Promise that is resolved with an array of results when all of the provided Promises 798 | * resolve, or rejected when any Promise is rejected. 799 | * @param values An array of Promises. 800 | * @returns A new Promise. 801 | */ 802 | all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike, T9 | PromiseLike, T10 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>; 803 | all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike, T9 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>; 804 | all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>; 805 | all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7]>; 806 | all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6]>; 807 | all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike]): Promise<[T1, T2, T3, T4, T5]>; 808 | all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike ]): Promise<[T1, T2, T3, T4]>; 809 | all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike]): Promise<[T1, T2, T3]>; 810 | all(values: [T1 | PromiseLike, T2 | PromiseLike]): Promise<[T1, T2]>; 811 | all(values: Iterable>): Promise; 812 | 813 | /** 814 | * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved 815 | * or rejected. 816 | * @param values An array of Promises. 817 | * @returns A new Promise. 818 | */ 819 | race(values: Iterable>): Promise; 820 | 821 | /** 822 | * Creates a new rejected promise for the provided reason. 823 | * @param reason The reason the promise was rejected. 824 | * @returns A new rejected Promise. 825 | */ 826 | reject(reason: any): Promise; 827 | 828 | /** 829 | * Creates a new rejected promise for the provided reason. 830 | * @param reason The reason the promise was rejected. 831 | * @returns A new rejected Promise. 832 | */ 833 | reject(reason: any): Promise; 834 | 835 | /** 836 | * Creates a new resolved promise for the provided value. 837 | * @param value A promise. 838 | * @returns A promise whose internal state matches the provided promise. 839 | */ 840 | resolve(value: T | PromiseLike): Promise; 841 | 842 | /** 843 | * Creates a new resolved promise . 844 | * @returns A resolved promise. 845 | */ 846 | resolve(): Promise; 847 | } 848 | 849 | declare var Promise: PromiseConstructor; 850 | 851 | // ############################################################################################# 852 | // ECMAScript 6: Reflect 853 | // Modules: es6.reflect 854 | // ############################################################################################# 855 | 856 | declare namespace Reflect { 857 | function apply(target: Function, thisArgument: any, argumentsList: ArrayLike): any; 858 | function construct(target: Function, argumentsList: ArrayLike, newTarget?: any): any; 859 | function defineProperty(target: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): boolean; 860 | function deleteProperty(target: any, propertyKey: PropertyKey): boolean; 861 | function enumerate(target: any): IterableIterator; 862 | function get(target: any, propertyKey: PropertyKey, receiver?: any): any; 863 | function getOwnPropertyDescriptor(target: any, propertyKey: PropertyKey): PropertyDescriptor; 864 | function getPrototypeOf(target: any): any; 865 | function has(target: any, propertyKey: PropertyKey): boolean; 866 | function isExtensible(target: any): boolean; 867 | function ownKeys(target: any): Array; 868 | function preventExtensions(target: any): boolean; 869 | function set(target: any, propertyKey: PropertyKey, value: any, receiver?: any): boolean; 870 | function setPrototypeOf(target: any, proto: any): boolean; 871 | } 872 | 873 | // ############################################################################################# 874 | // ECMAScript 7 875 | // Modules: es7.array.includes, es7.string.at, es7.string.lpad, es7.string.rpad, 876 | // es7.object.to-array, es7.object.get-own-property-descriptors, es7.regexp.escape, 877 | // es7.map.to-json, and es7.set.to-json 878 | // ############################################################################################# 879 | 880 | interface Array { 881 | includes(value: T, fromIndex?: number): boolean; 882 | } 883 | 884 | interface String { 885 | at(index: number): string; 886 | lpad(length: number, fillStr?: string): string; 887 | rpad(length: number, fillStr?: string): string; 888 | } 889 | 890 | interface ObjectConstructor { 891 | values(object: any): any[]; 892 | entries(object: any): [string, any][]; 893 | getOwnPropertyDescriptors(object: any): PropertyDescriptorMap; 894 | } 895 | 896 | interface RegExpConstructor { 897 | escape(str: string): string; 898 | } 899 | 900 | interface Map { 901 | toJSON(): any; 902 | } 903 | 904 | interface Set { 905 | toJSON(): any; 906 | } 907 | 908 | // ############################################################################################# 909 | // Mozilla JavaScript: Array generics 910 | // Modules: js.array.statics 911 | // ############################################################################################# 912 | 913 | interface ArrayConstructor { 914 | /** 915 | * Appends new elements to an array, and returns the new length of the array. 916 | * @param items New elements of the Array. 917 | */ 918 | push(array: ArrayLike, ...items: T[]): number; 919 | /** 920 | * Removes the last element from an array and returns it. 921 | */ 922 | pop(array: ArrayLike): T; 923 | /** 924 | * Combines two or more arrays. 925 | * @param items Additional items to add to the end of array1. 926 | */ 927 | concat(array: ArrayLike, ...items: (T[]| T)[]): T[]; 928 | /** 929 | * Adds all the elements of an array separated by the specified separator string. 930 | * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma. 931 | */ 932 | join(array: ArrayLike, separator?: string): string; 933 | /** 934 | * Reverses the elements in an Array. 935 | */ 936 | reverse(array: ArrayLike): T[]; 937 | /** 938 | * Removes the first element from an array and returns it. 939 | */ 940 | shift(array: ArrayLike): T; 941 | /** 942 | * Returns a section of an array. 943 | * @param start The beginning of the specified portion of the array. 944 | * @param end The end of the specified portion of the array. 945 | */ 946 | slice(array: ArrayLike, start?: number, end?: number): T[]; 947 | 948 | /** 949 | * Sorts an array. 950 | * @param compareFn The name of the function used to determine the order of the elements. If omitted, the elements are sorted in ascending, ASCII character order. 951 | */ 952 | sort(array: ArrayLike, compareFn?: (a: T, b: T) => number): T[]; 953 | 954 | /** 955 | * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. 956 | * @param start The zero-based location in the array from which to start removing elements. 957 | */ 958 | splice(array: ArrayLike, start: number): T[]; 959 | 960 | /** 961 | * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. 962 | * @param start The zero-based location in the array from which to start removing elements. 963 | * @param deleteCount The number of elements to remove. 964 | * @param items Elements to insert into the array in place of the deleted elements. 965 | */ 966 | splice(array: ArrayLike, start: number, deleteCount: number, ...items: T[]): T[]; 967 | 968 | /** 969 | * Inserts new elements at the start of an array. 970 | * @param items Elements to insert at the start of the Array. 971 | */ 972 | unshift(array: ArrayLike, ...items: T[]): number; 973 | 974 | /** 975 | * Returns the index of the first occurrence of a value in an array. 976 | * @param searchElement The value to locate in the array. 977 | * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. 978 | */ 979 | indexOf(array: ArrayLike, searchElement: T, fromIndex?: number): number; 980 | 981 | /** 982 | * Returns the index of the last occurrence of a specified value in an array. 983 | * @param searchElement The value to locate in the array. 984 | * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array. 985 | */ 986 | lastIndexOf(array: ArrayLike, earchElement: T, fromIndex?: number): number; 987 | 988 | /** 989 | * Determines whether all the members of an array satisfy the specified test. 990 | * @param callbackfn A function that accepts up to three arguments. The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array. 991 | * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. 992 | */ 993 | every(array: ArrayLike, callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean; 994 | 995 | /** 996 | * Determines whether the specified callback function returns true for any element of an array. 997 | * @param callbackfn A function that accepts up to three arguments. The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array. 998 | * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. 999 | */ 1000 | some(array: ArrayLike, callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean; 1001 | 1002 | /** 1003 | * Performs the specified action for each element in an array. 1004 | * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. 1005 | * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. 1006 | */ 1007 | forEach(array: ArrayLike, callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void; 1008 | 1009 | /** 1010 | * Calls a defined callback function on each element of an array, and returns an array that contains the results. 1011 | * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. 1012 | * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. 1013 | */ 1014 | map(array: ArrayLike, callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[]; 1015 | 1016 | /** 1017 | * Returns the elements of an array that meet the condition specified in a callback function. 1018 | * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array. 1019 | * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. 1020 | */ 1021 | filter(array: ArrayLike, callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): T[]; 1022 | 1023 | /** 1024 | * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. 1025 | * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. 1026 | * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. 1027 | */ 1028 | reduce(array: ArrayLike, callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; 1029 | 1030 | /** 1031 | * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. 1032 | * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. 1033 | * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. 1034 | */ 1035 | reduce(array: ArrayLike, callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; 1036 | 1037 | /** 1038 | * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. 1039 | * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. 1040 | * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. 1041 | */ 1042 | reduceRight(array: ArrayLike, callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; 1043 | 1044 | /** 1045 | * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. 1046 | * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. 1047 | * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. 1048 | */ 1049 | reduceRight(array: ArrayLike, callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; 1050 | 1051 | /** 1052 | * Returns an array of key, value pairs for every entry in the array 1053 | */ 1054 | entries(array: ArrayLike): IterableIterator<[number, T]>; 1055 | 1056 | /** 1057 | * Returns an list of keys in the array 1058 | */ 1059 | keys(array: ArrayLike): IterableIterator; 1060 | 1061 | /** 1062 | * Returns an list of values in the array 1063 | */ 1064 | values(array: ArrayLike): IterableIterator; 1065 | 1066 | /** 1067 | * Returns the value of the first element in the array where predicate is true, and undefined 1068 | * otherwise. 1069 | * @param predicate find calls predicate once for each element of the array, in ascending 1070 | * order, until it finds one where predicate returns true. If such an element is found, find 1071 | * immediately returns that element value. Otherwise, find returns undefined. 1072 | * @param thisArg If provided, it will be used as the this value for each invocation of 1073 | * predicate. If it is not provided, undefined is used instead. 1074 | */ 1075 | find(array: ArrayLike, predicate: (value: T, index: number, obj: Array) => boolean, thisArg?: any): T; 1076 | 1077 | /** 1078 | * Returns the index of the first element in the array where predicate is true, and undefined 1079 | * otherwise. 1080 | * @param predicate find calls predicate once for each element of the array, in ascending 1081 | * order, until it finds one where predicate returns true. If such an element is found, find 1082 | * immediately returns that element value. Otherwise, find returns undefined. 1083 | * @param thisArg If provided, it will be used as the this value for each invocation of 1084 | * predicate. If it is not provided, undefined is used instead. 1085 | */ 1086 | findIndex(array: ArrayLike, predicate: (value: T) => boolean, thisArg?: any): number; 1087 | 1088 | /** 1089 | * Returns the this object after filling the section identified by start and end with value 1090 | * @param value value to fill array section with 1091 | * @param start index to start filling the array at. If start is negative, it is treated as 1092 | * length+start where length is the length of the array. 1093 | * @param end index to stop filling the array at. If end is negative, it is treated as 1094 | * length+end. 1095 | */ 1096 | fill(array: ArrayLike, value: T, start?: number, end?: number): T[]; 1097 | 1098 | /** 1099 | * Returns the this object after copying a section of the array identified by start and end 1100 | * to the same array starting at position target 1101 | * @param target If target is negative, it is treated as length+target where length is the 1102 | * length of the array. 1103 | * @param start If start is negative, it is treated as length+start. If end is negative, it 1104 | * is treated as length+end. 1105 | * @param end If not specified, length of the this object is used as its default value. 1106 | */ 1107 | copyWithin(array: ArrayLike, target: number, start: number, end?: number): T[]; 1108 | 1109 | includes(array: ArrayLike, value: T, fromIndex?: number): boolean; 1110 | turn(array: ArrayLike, callbackfn: (memo: U, value: T, index: number, array: Array) => void, memo?: U): U; 1111 | turn(array: ArrayLike, callbackfn: (memo: Array, value: T, index: number, array: Array) => void, memo?: Array): Array; 1112 | } 1113 | 1114 | // ############################################################################################# 1115 | // Object - https://github.com/zloirock/core-js/#object 1116 | // Modules: core.object 1117 | // ############################################################################################# 1118 | 1119 | interface ObjectConstructor { 1120 | /** 1121 | * Non-standard. 1122 | */ 1123 | isObject(value: any): boolean; 1124 | 1125 | /** 1126 | * Non-standard. 1127 | */ 1128 | classof(value: any): string; 1129 | 1130 | /** 1131 | * Non-standard. 1132 | */ 1133 | define(target: T, mixin: any): T; 1134 | 1135 | /** 1136 | * Non-standard. 1137 | */ 1138 | make(proto: T, mixin?: any): T; 1139 | } 1140 | 1141 | // ############################################################################################# 1142 | // Console - https://github.com/zloirock/core-js/#console 1143 | // Modules: core.log 1144 | // ############################################################################################# 1145 | 1146 | interface Log extends Console { 1147 | (message?: any, ...optionalParams: any[]): void; 1148 | enable(): void; 1149 | disable(): void; 1150 | } 1151 | 1152 | /** 1153 | * Non-standard. 1154 | */ 1155 | declare var log: Log; 1156 | 1157 | // ############################################################################################# 1158 | // Dict - https://github.com/zloirock/core-js/#dict 1159 | // Modules: core.dict 1160 | // ############################################################################################# 1161 | 1162 | interface Dict { 1163 | [key: string]: T; 1164 | [key: number]: T; 1165 | //[key: symbol]: T; 1166 | } 1167 | 1168 | interface DictConstructor { 1169 | prototype: Dict; 1170 | 1171 | new (value?: Dict): Dict; 1172 | new (value?: any): Dict; 1173 | (value?: Dict): Dict; 1174 | (value?: any): Dict; 1175 | 1176 | isDict(value: any): boolean; 1177 | values(object: Dict): IterableIterator; 1178 | keys(object: Dict): IterableIterator; 1179 | entries(object: Dict): IterableIterator<[PropertyKey, T]>; 1180 | has(object: Dict, key: PropertyKey): boolean; 1181 | get(object: Dict, key: PropertyKey): T; 1182 | set(object: Dict, key: PropertyKey, value: T): Dict; 1183 | forEach(object: Dict, callbackfn: (value: T, key: PropertyKey, dict: Dict) => void, thisArg?: any): void; 1184 | map(object: Dict, callbackfn: (value: T, key: PropertyKey, dict: Dict) => U, thisArg?: any): Dict; 1185 | mapPairs(object: Dict, callbackfn: (value: T, key: PropertyKey, dict: Dict) => [PropertyKey, U], thisArg?: any): Dict; 1186 | filter(object: Dict, callbackfn: (value: T, key: PropertyKey, dict: Dict) => boolean, thisArg?: any): Dict; 1187 | some(object: Dict, callbackfn: (value: T, key: PropertyKey, dict: Dict) => boolean, thisArg?: any): boolean; 1188 | every(object: Dict, callbackfn: (value: T, key: PropertyKey, dict: Dict) => boolean, thisArg?: any): boolean; 1189 | find(object: Dict, callbackfn: (value: T, key: PropertyKey, dict: Dict) => boolean, thisArg?: any): T; 1190 | findKey(object: Dict, callbackfn: (value: T, key: PropertyKey, dict: Dict) => boolean, thisArg?: any): PropertyKey; 1191 | keyOf(object: Dict, value: T): PropertyKey; 1192 | includes(object: Dict, value: T): boolean; 1193 | reduce(object: Dict, callbackfn: (previousValue: U, value: T, key: PropertyKey, dict: Dict) => U, initialValue: U): U; 1194 | reduce(object: Dict, callbackfn: (previousValue: T, value: T, key: PropertyKey, dict: Dict) => T, initialValue?: T): T; 1195 | turn(object: Dict, callbackfn: (memo: Dict, value: T, key: PropertyKey, dict: Dict) => void, memo: Dict): Dict; 1196 | turn(object: Dict, callbackfn: (memo: Dict, value: T, key: PropertyKey, dict: Dict) => void, memo?: Dict): Dict; 1197 | } 1198 | 1199 | /** 1200 | * Non-standard. 1201 | */ 1202 | declare var Dict: DictConstructor; 1203 | 1204 | // ############################################################################################# 1205 | // Partial application - https://github.com/zloirock/core-js/#partial-application 1206 | // Modules: core.function.part 1207 | // ############################################################################################# 1208 | 1209 | interface Function { 1210 | /** 1211 | * Non-standard. 1212 | */ 1213 | part(...args: any[]): any; 1214 | } 1215 | 1216 | // ############################################################################################# 1217 | // Date formatting - https://github.com/zloirock/core-js/#date-formatting 1218 | // Modules: core.date 1219 | // ############################################################################################# 1220 | 1221 | interface Date { 1222 | /** 1223 | * Non-standard. 1224 | */ 1225 | format(template: string, locale?: string): string; 1226 | 1227 | /** 1228 | * Non-standard. 1229 | */ 1230 | formatUTC(template: string, locale?: string): string; 1231 | } 1232 | 1233 | // ############################################################################################# 1234 | // Array - https://github.com/zloirock/core-js/#array 1235 | // Modules: core.array.turn 1236 | // ############################################################################################# 1237 | 1238 | interface Array { 1239 | /** 1240 | * Non-standard. 1241 | */ 1242 | turn(callbackfn: (memo: U, value: T, index: number, array: Array) => void, memo?: U): U; 1243 | 1244 | /** 1245 | * Non-standard. 1246 | */ 1247 | turn(callbackfn: (memo: Array, value: T, index: number, array: Array) => void, memo?: Array): Array; 1248 | } 1249 | 1250 | // ############################################################################################# 1251 | // Number - https://github.com/zloirock/core-js/#number 1252 | // Modules: core.number.iterator 1253 | // ############################################################################################# 1254 | 1255 | interface Number { 1256 | /** 1257 | * Non-standard. 1258 | */ 1259 | [Symbol.iterator](): IterableIterator; 1260 | } 1261 | 1262 | // ############################################################################################# 1263 | // Escaping characters - https://github.com/zloirock/core-js/#escaping-characters 1264 | // Modules: core.string.escape-html 1265 | // ############################################################################################# 1266 | 1267 | interface String { 1268 | /** 1269 | * Non-standard. 1270 | */ 1271 | escapeHTML(): string; 1272 | 1273 | /** 1274 | * Non-standard. 1275 | */ 1276 | unescapeHTML(): string; 1277 | } 1278 | 1279 | // ############################################################################################# 1280 | // delay - https://github.com/zloirock/core-js/#delay 1281 | // Modules: core.delay 1282 | // ############################################################################################# 1283 | 1284 | declare function delay(msec: number): Promise; 1285 | 1286 | declare namespace core { 1287 | var version: string; 1288 | 1289 | namespace Reflect { 1290 | function apply(target: Function, thisArgument: any, argumentsList: ArrayLike): any; 1291 | function construct(target: Function, argumentsList: ArrayLike): any; 1292 | function defineProperty(target: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): boolean; 1293 | function deleteProperty(target: any, propertyKey: PropertyKey): boolean; 1294 | function enumerate(target: any): IterableIterator; 1295 | function get(target: any, propertyKey: PropertyKey, receiver?: any): any; 1296 | function getOwnPropertyDescriptor(target: any, propertyKey: PropertyKey): PropertyDescriptor; 1297 | function getPrototypeOf(target: any): any; 1298 | function has(target: any, propertyKey: string): boolean; 1299 | function has(target: any, propertyKey: symbol): boolean; 1300 | function isExtensible(target: any): boolean; 1301 | function ownKeys(target: any): Array; 1302 | function preventExtensions(target: any): boolean; 1303 | function set(target: any, propertyKey: PropertyKey, value: any, receiver?: any): boolean; 1304 | function setPrototypeOf(target: any, proto: any): boolean; 1305 | } 1306 | 1307 | var Object: { 1308 | getPrototypeOf(o: any): any; 1309 | getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor; 1310 | getOwnPropertyNames(o: any): string[]; 1311 | create(o: any, properties?: PropertyDescriptorMap): any; 1312 | defineProperty(o: any, p: string, attributes: PropertyDescriptor): any; 1313 | defineProperties(o: any, properties: PropertyDescriptorMap): any; 1314 | seal(o: T): T; 1315 | freeze(o: T): T; 1316 | preventExtensions(o: T): T; 1317 | isSealed(o: any): boolean; 1318 | isFrozen(o: any): boolean; 1319 | isExtensible(o: any): boolean; 1320 | keys(o: any): string[]; 1321 | assign(target: any, ...sources: any[]): any; 1322 | is(value1: any, value2: any): boolean; 1323 | setPrototypeOf(o: any, proto: any): any; 1324 | getOwnPropertySymbols(o: any): symbol[]; 1325 | getOwnPropertyDescriptor(o: any, propertyKey: PropertyKey): PropertyDescriptor; 1326 | defineProperty(o: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): any; 1327 | values(object: any): any[]; 1328 | entries(object: any): any[]; 1329 | getOwnPropertyDescriptors(object: any): PropertyDescriptorMap; 1330 | isObject(value: any): boolean; 1331 | classof(value: any): string; 1332 | define(target: T, mixin: any): T; 1333 | make(proto: T, mixin?: any): T; 1334 | }; 1335 | 1336 | var Function: { 1337 | bind(target: Function, thisArg: any, ...argArray: any[]): any; 1338 | part(target: Function, ...args: any[]): any; 1339 | }; 1340 | 1341 | var Array: { 1342 | from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): Array; 1343 | from(iterable: Iterable, mapfn: (v: T, k: number) => U, thisArg?: any): Array; 1344 | from(arrayLike: ArrayLike): Array; 1345 | from(iterable: Iterable): Array; 1346 | of(...items: T[]): Array; 1347 | push(array: ArrayLike, ...items: T[]): number; 1348 | pop(array: ArrayLike): T; 1349 | concat(array: ArrayLike, ...items: (T[]| T)[]): T[]; 1350 | join(array: ArrayLike, separator?: string): string; 1351 | reverse(array: ArrayLike): T[]; 1352 | shift(array: ArrayLike): T; 1353 | slice(array: ArrayLike, start?: number, end?: number): T[]; 1354 | sort(array: ArrayLike, compareFn?: (a: T, b: T) => number): T[]; 1355 | splice(array: ArrayLike, start: number): T[]; 1356 | splice(array: ArrayLike, start: number, deleteCount: number, ...items: T[]): T[]; 1357 | unshift(array: ArrayLike, ...items: T[]): number; 1358 | indexOf(array: ArrayLike, searchElement: T, fromIndex?: number): number; 1359 | lastIndexOf(array: ArrayLike, earchElement: T, fromIndex?: number): number; 1360 | every(array: ArrayLike, callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean; 1361 | some(array: ArrayLike, callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean; 1362 | forEach(array: ArrayLike, callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void; 1363 | map(array: ArrayLike, callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[]; 1364 | filter(array: ArrayLike, callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): T[]; 1365 | reduce(array: ArrayLike, callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; 1366 | reduce(array: ArrayLike, callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; 1367 | reduceRight(array: ArrayLike, callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; 1368 | reduceRight(array: ArrayLike, callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; 1369 | entries(array: ArrayLike): IterableIterator<[number, T]>; 1370 | keys(array: ArrayLike): IterableIterator; 1371 | values(array: ArrayLike): IterableIterator; 1372 | find(array: ArrayLike, predicate: (value: T, index: number, obj: Array) => boolean, thisArg?: any): T; 1373 | findIndex(array: ArrayLike, predicate: (value: T) => boolean, thisArg?: any): number; 1374 | fill(array: ArrayLike, value: T, start?: number, end?: number): T[]; 1375 | copyWithin(array: ArrayLike, target: number, start: number, end?: number): T[]; 1376 | includes(array: ArrayLike, value: T, fromIndex?: number): boolean; 1377 | turn(array: ArrayLike, callbackfn: (memo: Array, value: T, index: number, array: Array) => void, memo?: Array): Array; 1378 | turn(array: ArrayLike, callbackfn: (memo: U, value: T, index: number, array: Array) => void, memo?: U): U; 1379 | }; 1380 | 1381 | var String: { 1382 | codePointAt(text: string, pos: number): number; 1383 | includes(text: string, searchString: string, position?: number): boolean; 1384 | endsWith(text: string, searchString: string, endPosition?: number): boolean; 1385 | repeat(text: string, count: number): string; 1386 | fromCodePoint(...codePoints: number[]): string; 1387 | raw(template: TemplateStringsArray, ...substitutions: any[]): string; 1388 | startsWith(text: string, searchString: string, position?: number): boolean; 1389 | at(text: string, index: number): string; 1390 | lpad(text: string, length: number, fillStr?: string): string; 1391 | rpad(text: string, length: number, fillStr?: string): string; 1392 | escapeHTML(text: string): string; 1393 | unescapeHTML(text: string): string; 1394 | }; 1395 | 1396 | var Date: { 1397 | now(): number; 1398 | toISOString(date: Date): string; 1399 | format(date: Date, template: string, locale?: string): string; 1400 | formatUTC(date: Date, template: string, locale?: string): string; 1401 | }; 1402 | 1403 | var Number: { 1404 | EPSILON: number; 1405 | isFinite(number: number): boolean; 1406 | isInteger(number: number): boolean; 1407 | isNaN(number: number): boolean; 1408 | isSafeInteger(number: number): boolean; 1409 | MAX_SAFE_INTEGER: number; 1410 | MIN_SAFE_INTEGER: number; 1411 | parseFloat(string: string): number; 1412 | parseInt(string: string, radix?: number): number; 1413 | clz32(x: number): number; 1414 | imul(x: number, y: number): number; 1415 | sign(x: number): number; 1416 | log10(x: number): number; 1417 | log2(x: number): number; 1418 | log1p(x: number): number; 1419 | expm1(x: number): number; 1420 | cosh(x: number): number; 1421 | sinh(x: number): number; 1422 | tanh(x: number): number; 1423 | acosh(x: number): number; 1424 | asinh(x: number): number; 1425 | atanh(x: number): number; 1426 | hypot(...values: number[]): number; 1427 | trunc(x: number): number; 1428 | fround(x: number): number; 1429 | cbrt(x: number): number; 1430 | random(lim?: number): number; 1431 | }; 1432 | 1433 | var Math: { 1434 | clz32(x: number): number; 1435 | imul(x: number, y: number): number; 1436 | sign(x: number): number; 1437 | log10(x: number): number; 1438 | log2(x: number): number; 1439 | log1p(x: number): number; 1440 | expm1(x: number): number; 1441 | cosh(x: number): number; 1442 | sinh(x: number): number; 1443 | tanh(x: number): number; 1444 | acosh(x: number): number; 1445 | asinh(x: number): number; 1446 | atanh(x: number): number; 1447 | hypot(...values: number[]): number; 1448 | trunc(x: number): number; 1449 | fround(x: number): number; 1450 | cbrt(x: number): number; 1451 | }; 1452 | 1453 | var RegExp: { 1454 | escape(str: string): string; 1455 | }; 1456 | 1457 | var Map: MapConstructor; 1458 | var Set: SetConstructor; 1459 | var WeakMap: WeakMapConstructor; 1460 | var WeakSet: WeakSetConstructor; 1461 | var Promise: PromiseConstructor; 1462 | var Symbol: SymbolConstructor; 1463 | var Dict: DictConstructor; 1464 | var global: any; 1465 | var log: Log; 1466 | var _: boolean; 1467 | 1468 | function setTimeout(handler: any, timeout?: any, ...args: any[]): number; 1469 | 1470 | function setInterval(handler: any, timeout?: any, ...args: any[]): number; 1471 | 1472 | function setImmediate(expression: any, ...args: any[]): number; 1473 | 1474 | function clearImmediate(handle: number): void; 1475 | 1476 | function $for(iterable: Iterable): $for; 1477 | 1478 | function isIterable(value: any): boolean; 1479 | 1480 | function getIterator(iterable: Iterable): Iterator; 1481 | 1482 | interface Locale { 1483 | weekdays: string; 1484 | months: string; 1485 | } 1486 | 1487 | function addLocale(lang: string, locale: Locale): typeof core; 1488 | 1489 | function locale(lang?: string): string; 1490 | 1491 | function delay(msec: number): Promise; 1492 | } 1493 | 1494 | declare module "core-js" { 1495 | export = core; 1496 | } 1497 | declare module "core-js/shim" { 1498 | export = core; 1499 | } 1500 | declare module "core-js/core" { 1501 | export = core; 1502 | } 1503 | declare module "core-js/core/$for" { 1504 | import $for = core.$for; 1505 | export = $for; 1506 | } 1507 | declare module "core-js/core/_" { 1508 | var _: typeof core._; 1509 | export = _; 1510 | } 1511 | declare module "core-js/core/array" { 1512 | var Array: typeof core.Array; 1513 | export = Array; 1514 | } 1515 | declare module "core-js/core/date" { 1516 | var Date: typeof core.Date; 1517 | export = Date; 1518 | } 1519 | declare module "core-js/core/delay" { 1520 | var delay: typeof core.delay; 1521 | export = delay; 1522 | } 1523 | declare module "core-js/core/dict" { 1524 | var Dict: typeof core.Dict; 1525 | export = Dict; 1526 | } 1527 | declare module "core-js/core/function" { 1528 | var Function: typeof core.Function; 1529 | export = Function; 1530 | } 1531 | declare module "core-js/core/global" { 1532 | var global: typeof core.global; 1533 | export = global; 1534 | } 1535 | declare module "core-js/core/log" { 1536 | var log: typeof core.log; 1537 | export = log; 1538 | } 1539 | declare module "core-js/core/number" { 1540 | var Number: typeof core.Number; 1541 | export = Number; 1542 | } 1543 | declare module "core-js/core/object" { 1544 | var Object: typeof core.Object; 1545 | export = Object; 1546 | } 1547 | declare module "core-js/core/string" { 1548 | var String: typeof core.String; 1549 | export = String; 1550 | } 1551 | declare module "core-js/fn/$for" { 1552 | import $for = core.$for; 1553 | export = $for; 1554 | } 1555 | declare module "core-js/fn/_" { 1556 | var _: typeof core._; 1557 | export = _; 1558 | } 1559 | declare module "core-js/fn/clear-immediate" { 1560 | var clearImmediate: typeof core.clearImmediate; 1561 | export = clearImmediate; 1562 | } 1563 | declare module "core-js/fn/delay" { 1564 | var delay: typeof core.delay; 1565 | export = delay; 1566 | } 1567 | declare module "core-js/fn/dict" { 1568 | var Dict: typeof core.Dict; 1569 | export = Dict; 1570 | } 1571 | declare module "core-js/fn/get-iterator" { 1572 | var getIterator: typeof core.getIterator; 1573 | export = getIterator; 1574 | } 1575 | declare module "core-js/fn/global" { 1576 | var global: typeof core.global; 1577 | export = global; 1578 | } 1579 | declare module "core-js/fn/is-iterable" { 1580 | var isIterable: typeof core.isIterable; 1581 | export = isIterable; 1582 | } 1583 | declare module "core-js/fn/log" { 1584 | var log: typeof core.log; 1585 | export = log; 1586 | } 1587 | declare module "core-js/fn/map" { 1588 | var Map: typeof core.Map; 1589 | export = Map; 1590 | } 1591 | declare module "core-js/fn/promise" { 1592 | var Promise: typeof core.Promise; 1593 | export = Promise; 1594 | } 1595 | declare module "core-js/fn/set" { 1596 | var Set: typeof core.Set; 1597 | export = Set; 1598 | } 1599 | declare module "core-js/fn/set-immediate" { 1600 | var setImmediate: typeof core.setImmediate; 1601 | export = setImmediate; 1602 | } 1603 | declare module "core-js/fn/set-interval" { 1604 | var setInterval: typeof core.setInterval; 1605 | export = setInterval; 1606 | } 1607 | declare module "core-js/fn/set-timeout" { 1608 | var setTimeout: typeof core.setTimeout; 1609 | export = setTimeout; 1610 | } 1611 | declare module "core-js/fn/weak-map" { 1612 | var WeakMap: typeof core.WeakMap; 1613 | export = WeakMap; 1614 | } 1615 | declare module "core-js/fn/weak-set" { 1616 | var WeakSet: typeof core.WeakSet; 1617 | export = WeakSet; 1618 | } 1619 | declare module "core-js/fn/array" { 1620 | var Array: typeof core.Array; 1621 | export = Array; 1622 | } 1623 | declare module "core-js/fn/array/concat" { 1624 | var concat: typeof core.Array.concat; 1625 | export = concat; 1626 | } 1627 | declare module "core-js/fn/array/copy-within" { 1628 | var copyWithin: typeof core.Array.copyWithin; 1629 | export = copyWithin; 1630 | } 1631 | declare module "core-js/fn/array/entries" { 1632 | var entries: typeof core.Array.entries; 1633 | export = entries; 1634 | } 1635 | declare module "core-js/fn/array/every" { 1636 | var every: typeof core.Array.every; 1637 | export = every; 1638 | } 1639 | declare module "core-js/fn/array/fill" { 1640 | var fill: typeof core.Array.fill; 1641 | export = fill; 1642 | } 1643 | declare module "core-js/fn/array/filter" { 1644 | var filter: typeof core.Array.filter; 1645 | export = filter; 1646 | } 1647 | declare module "core-js/fn/array/find" { 1648 | var find: typeof core.Array.find; 1649 | export = find; 1650 | } 1651 | declare module "core-js/fn/array/find-index" { 1652 | var findIndex: typeof core.Array.findIndex; 1653 | export = findIndex; 1654 | } 1655 | declare module "core-js/fn/array/for-each" { 1656 | var forEach: typeof core.Array.forEach; 1657 | export = forEach; 1658 | } 1659 | declare module "core-js/fn/array/from" { 1660 | var from: typeof core.Array.from; 1661 | export = from; 1662 | } 1663 | declare module "core-js/fn/array/includes" { 1664 | var includes: typeof core.Array.includes; 1665 | export = includes; 1666 | } 1667 | declare module "core-js/fn/array/index-of" { 1668 | var indexOf: typeof core.Array.indexOf; 1669 | export = indexOf; 1670 | } 1671 | declare module "core-js/fn/array/join" { 1672 | var join: typeof core.Array.join; 1673 | export = join; 1674 | } 1675 | declare module "core-js/fn/array/keys" { 1676 | var keys: typeof core.Array.keys; 1677 | export = keys; 1678 | } 1679 | declare module "core-js/fn/array/last-index-of" { 1680 | var lastIndexOf: typeof core.Array.lastIndexOf; 1681 | export = lastIndexOf; 1682 | } 1683 | declare module "core-js/fn/array/map" { 1684 | var map: typeof core.Array.map; 1685 | export = map; 1686 | } 1687 | declare module "core-js/fn/array/of" { 1688 | var of: typeof core.Array.of; 1689 | export = of; 1690 | } 1691 | declare module "core-js/fn/array/pop" { 1692 | var pop: typeof core.Array.pop; 1693 | export = pop; 1694 | } 1695 | declare module "core-js/fn/array/push" { 1696 | var push: typeof core.Array.push; 1697 | export = push; 1698 | } 1699 | declare module "core-js/fn/array/reduce" { 1700 | var reduce: typeof core.Array.reduce; 1701 | export = reduce; 1702 | } 1703 | declare module "core-js/fn/array/reduce-right" { 1704 | var reduceRight: typeof core.Array.reduceRight; 1705 | export = reduceRight; 1706 | } 1707 | declare module "core-js/fn/array/reverse" { 1708 | var reverse: typeof core.Array.reverse; 1709 | export = reverse; 1710 | } 1711 | declare module "core-js/fn/array/shift" { 1712 | var shift: typeof core.Array.shift; 1713 | export = shift; 1714 | } 1715 | declare module "core-js/fn/array/slice" { 1716 | var slice: typeof core.Array.slice; 1717 | export = slice; 1718 | } 1719 | declare module "core-js/fn/array/some" { 1720 | var some: typeof core.Array.some; 1721 | export = some; 1722 | } 1723 | declare module "core-js/fn/array/sort" { 1724 | var sort: typeof core.Array.sort; 1725 | export = sort; 1726 | } 1727 | declare module "core-js/fn/array/splice" { 1728 | var splice: typeof core.Array.splice; 1729 | export = splice; 1730 | } 1731 | declare module "core-js/fn/array/turn" { 1732 | var turn: typeof core.Array.turn; 1733 | export = turn; 1734 | } 1735 | declare module "core-js/fn/array/unshift" { 1736 | var unshift: typeof core.Array.unshift; 1737 | export = unshift; 1738 | } 1739 | declare module "core-js/fn/array/values" { 1740 | var values: typeof core.Array.values; 1741 | export = values; 1742 | } 1743 | declare module "core-js/fn/date" { 1744 | var Date: typeof core.Date; 1745 | export = Date; 1746 | } 1747 | declare module "core-js/fn/date/add-locale" { 1748 | var addLocale: typeof core.addLocale; 1749 | export = addLocale; 1750 | } 1751 | declare module "core-js/fn/date/format" { 1752 | var format: typeof core.Date.format; 1753 | export = format; 1754 | } 1755 | declare module "core-js/fn/date/formatUTC" { 1756 | var formatUTC: typeof core.Date.formatUTC; 1757 | export = formatUTC; 1758 | } 1759 | declare module "core-js/fn/function" { 1760 | var Function: typeof core.Function; 1761 | export = Function; 1762 | } 1763 | declare module "core-js/fn/function/has-instance" { 1764 | var hasInstance: (value: any) => boolean; 1765 | export = hasInstance; 1766 | } 1767 | declare module "core-js/fn/function/name" 1768 | { 1769 | } 1770 | declare module "core-js/fn/function/part" { 1771 | var part: typeof core.Function.part; 1772 | export = part; 1773 | } 1774 | declare module "core-js/fn/math" { 1775 | var Math: typeof core.Math; 1776 | export = Math; 1777 | } 1778 | declare module "core-js/fn/math/acosh" { 1779 | var acosh: typeof core.Math.acosh; 1780 | export = acosh; 1781 | } 1782 | declare module "core-js/fn/math/asinh" { 1783 | var asinh: typeof core.Math.asinh; 1784 | export = asinh; 1785 | } 1786 | declare module "core-js/fn/math/atanh" { 1787 | var atanh: typeof core.Math.atanh; 1788 | export = atanh; 1789 | } 1790 | declare module "core-js/fn/math/cbrt" { 1791 | var cbrt: typeof core.Math.cbrt; 1792 | export = cbrt; 1793 | } 1794 | declare module "core-js/fn/math/clz32" { 1795 | var clz32: typeof core.Math.clz32; 1796 | export = clz32; 1797 | } 1798 | declare module "core-js/fn/math/cosh" { 1799 | var cosh: typeof core.Math.cosh; 1800 | export = cosh; 1801 | } 1802 | declare module "core-js/fn/math/expm1" { 1803 | var expm1: typeof core.Math.expm1; 1804 | export = expm1; 1805 | } 1806 | declare module "core-js/fn/math/fround" { 1807 | var fround: typeof core.Math.fround; 1808 | export = fround; 1809 | } 1810 | declare module "core-js/fn/math/hypot" { 1811 | var hypot: typeof core.Math.hypot; 1812 | export = hypot; 1813 | } 1814 | declare module "core-js/fn/math/imul" { 1815 | var imul: typeof core.Math.imul; 1816 | export = imul; 1817 | } 1818 | declare module "core-js/fn/math/log10" { 1819 | var log10: typeof core.Math.log10; 1820 | export = log10; 1821 | } 1822 | declare module "core-js/fn/math/log1p" { 1823 | var log1p: typeof core.Math.log1p; 1824 | export = log1p; 1825 | } 1826 | declare module "core-js/fn/math/log2" { 1827 | var log2: typeof core.Math.log2; 1828 | export = log2; 1829 | } 1830 | declare module "core-js/fn/math/sign" { 1831 | var sign: typeof core.Math.sign; 1832 | export = sign; 1833 | } 1834 | declare module "core-js/fn/math/sinh" { 1835 | var sinh: typeof core.Math.sinh; 1836 | export = sinh; 1837 | } 1838 | declare module "core-js/fn/math/tanh" { 1839 | var tanh: typeof core.Math.tanh; 1840 | export = tanh; 1841 | } 1842 | declare module "core-js/fn/math/trunc" { 1843 | var trunc: typeof core.Math.trunc; 1844 | export = trunc; 1845 | } 1846 | declare module "core-js/fn/number" { 1847 | var Number: typeof core.Number; 1848 | export = Number; 1849 | } 1850 | declare module "core-js/fn/number/epsilon" { 1851 | var EPSILON: typeof core.Number.EPSILON; 1852 | export = EPSILON; 1853 | } 1854 | declare module "core-js/fn/number/is-finite" { 1855 | var isFinite: typeof core.Number.isFinite; 1856 | export = isFinite; 1857 | } 1858 | declare module "core-js/fn/number/is-integer" { 1859 | var isInteger: typeof core.Number.isInteger; 1860 | export = isInteger; 1861 | } 1862 | declare module "core-js/fn/number/is-nan" { 1863 | var isNaN: typeof core.Number.isNaN; 1864 | export = isNaN; 1865 | } 1866 | declare module "core-js/fn/number/is-safe-integer" { 1867 | var isSafeInteger: typeof core.Number.isSafeInteger; 1868 | export = isSafeInteger; 1869 | } 1870 | declare module "core-js/fn/number/max-safe-integer" { 1871 | var MAX_SAFE_INTEGER: typeof core.Number.MAX_SAFE_INTEGER; 1872 | export = MAX_SAFE_INTEGER; 1873 | } 1874 | declare module "core-js/fn/number/min-safe-interger" { 1875 | var MIN_SAFE_INTEGER: typeof core.Number.MIN_SAFE_INTEGER; 1876 | export = MIN_SAFE_INTEGER; 1877 | } 1878 | declare module "core-js/fn/number/parse-float" { 1879 | var parseFloat: typeof core.Number.parseFloat; 1880 | export = parseFloat; 1881 | } 1882 | declare module "core-js/fn/number/parse-int" { 1883 | var parseInt: typeof core.Number.parseInt; 1884 | export = parseInt; 1885 | } 1886 | declare module "core-js/fn/number/random" { 1887 | var random: typeof core.Number.random; 1888 | export = random; 1889 | } 1890 | declare module "core-js/fn/object" { 1891 | var Object: typeof core.Object; 1892 | export = Object; 1893 | } 1894 | declare module "core-js/fn/object/assign" { 1895 | var assign: typeof core.Object.assign; 1896 | export = assign; 1897 | } 1898 | declare module "core-js/fn/object/classof" { 1899 | var classof: typeof core.Object.classof; 1900 | export = classof; 1901 | } 1902 | declare module "core-js/fn/object/create" { 1903 | var create: typeof core.Object.create; 1904 | export = create; 1905 | } 1906 | declare module "core-js/fn/object/define" { 1907 | var define: typeof core.Object.define; 1908 | export = define; 1909 | } 1910 | declare module "core-js/fn/object/define-properties" { 1911 | var defineProperties: typeof core.Object.defineProperties; 1912 | export = defineProperties; 1913 | } 1914 | declare module "core-js/fn/object/define-property" { 1915 | var defineProperty: typeof core.Object.defineProperty; 1916 | export = defineProperty; 1917 | } 1918 | declare module "core-js/fn/object/entries" { 1919 | var entries: typeof core.Object.entries; 1920 | export = entries; 1921 | } 1922 | declare module "core-js/fn/object/freeze" { 1923 | var freeze: typeof core.Object.freeze; 1924 | export = freeze; 1925 | } 1926 | declare module "core-js/fn/object/get-own-property-descriptor" { 1927 | var getOwnPropertyDescriptor: typeof core.Object.getOwnPropertyDescriptor; 1928 | export = getOwnPropertyDescriptor; 1929 | } 1930 | declare module "core-js/fn/object/get-own-property-descriptors" { 1931 | var getOwnPropertyDescriptors: typeof core.Object.getOwnPropertyDescriptors; 1932 | export = getOwnPropertyDescriptors; 1933 | } 1934 | declare module "core-js/fn/object/get-own-property-names" { 1935 | var getOwnPropertyNames: typeof core.Object.getOwnPropertyNames; 1936 | export = getOwnPropertyNames; 1937 | } 1938 | declare module "core-js/fn/object/get-own-property-symbols" { 1939 | var getOwnPropertySymbols: typeof core.Object.getOwnPropertySymbols; 1940 | export = getOwnPropertySymbols; 1941 | } 1942 | declare module "core-js/fn/object/get-prototype-of" { 1943 | var getPrototypeOf: typeof core.Object.getPrototypeOf; 1944 | export = getPrototypeOf; 1945 | } 1946 | declare module "core-js/fn/object/is" { 1947 | var is: typeof core.Object.is; 1948 | export = is; 1949 | } 1950 | declare module "core-js/fn/object/is-extensible" { 1951 | var isExtensible: typeof core.Object.isExtensible; 1952 | export = isExtensible; 1953 | } 1954 | declare module "core-js/fn/object/is-frozen" { 1955 | var isFrozen: typeof core.Object.isFrozen; 1956 | export = isFrozen; 1957 | } 1958 | declare module "core-js/fn/object/is-object" { 1959 | var isObject: typeof core.Object.isObject; 1960 | export = isObject; 1961 | } 1962 | declare module "core-js/fn/object/is-sealed" { 1963 | var isSealed: typeof core.Object.isSealed; 1964 | export = isSealed; 1965 | } 1966 | declare module "core-js/fn/object/keys" { 1967 | var keys: typeof core.Object.keys; 1968 | export = keys; 1969 | } 1970 | declare module "core-js/fn/object/make" { 1971 | var make: typeof core.Object.make; 1972 | export = make; 1973 | } 1974 | declare module "core-js/fn/object/prevent-extensions" { 1975 | var preventExtensions: typeof core.Object.preventExtensions; 1976 | export = preventExtensions; 1977 | } 1978 | declare module "core-js/fn/object/seal" { 1979 | var seal: typeof core.Object.seal; 1980 | export = seal; 1981 | } 1982 | declare module "core-js/fn/object/set-prototype-of" { 1983 | var setPrototypeOf: typeof core.Object.setPrototypeOf; 1984 | export = setPrototypeOf; 1985 | } 1986 | declare module "core-js/fn/object/values" { 1987 | var values: typeof core.Object.values; 1988 | export = values; 1989 | } 1990 | declare module "core-js/fn/reflect" { 1991 | var Reflect: typeof core.Reflect; 1992 | export = Reflect; 1993 | } 1994 | declare module "core-js/fn/reflect/apply" { 1995 | var apply: typeof core.Reflect.apply; 1996 | export = apply; 1997 | } 1998 | declare module "core-js/fn/reflect/construct" { 1999 | var construct: typeof core.Reflect.construct; 2000 | export = construct; 2001 | } 2002 | declare module "core-js/fn/reflect/define-property" { 2003 | var defineProperty: typeof core.Reflect.defineProperty; 2004 | export = defineProperty; 2005 | } 2006 | declare module "core-js/fn/reflect/delete-property" { 2007 | var deleteProperty: typeof core.Reflect.deleteProperty; 2008 | export = deleteProperty; 2009 | } 2010 | declare module "core-js/fn/reflect/enumerate" { 2011 | var enumerate: typeof core.Reflect.enumerate; 2012 | export = enumerate; 2013 | } 2014 | declare module "core-js/fn/reflect/get" { 2015 | var get: typeof core.Reflect.get; 2016 | export = get; 2017 | } 2018 | declare module "core-js/fn/reflect/get-own-property-descriptor" { 2019 | var getOwnPropertyDescriptor: typeof core.Reflect.getOwnPropertyDescriptor; 2020 | export = getOwnPropertyDescriptor; 2021 | } 2022 | declare module "core-js/fn/reflect/get-prototype-of" { 2023 | var getPrototypeOf: typeof core.Reflect.getPrototypeOf; 2024 | export = getPrototypeOf; 2025 | } 2026 | declare module "core-js/fn/reflect/has" { 2027 | var has: typeof core.Reflect.has; 2028 | export = has; 2029 | } 2030 | declare module "core-js/fn/reflect/is-extensible" { 2031 | var isExtensible: typeof core.Reflect.isExtensible; 2032 | export = isExtensible; 2033 | } 2034 | declare module "core-js/fn/reflect/own-keys" { 2035 | var ownKeys: typeof core.Reflect.ownKeys; 2036 | export = ownKeys; 2037 | } 2038 | declare module "core-js/fn/reflect/prevent-extensions" { 2039 | var preventExtensions: typeof core.Reflect.preventExtensions; 2040 | export = preventExtensions; 2041 | } 2042 | declare module "core-js/fn/reflect/set" { 2043 | var set: typeof core.Reflect.set; 2044 | export = set; 2045 | } 2046 | declare module "core-js/fn/reflect/set-prototype-of" { 2047 | var setPrototypeOf: typeof core.Reflect.setPrototypeOf; 2048 | export = setPrototypeOf; 2049 | } 2050 | declare module "core-js/fn/regexp" { 2051 | var RegExp: typeof core.RegExp; 2052 | export = RegExp; 2053 | } 2054 | declare module "core-js/fn/regexp/escape" { 2055 | var escape: typeof core.RegExp.escape; 2056 | export = escape; 2057 | } 2058 | declare module "core-js/fn/string" { 2059 | var String: typeof core.String; 2060 | export = String; 2061 | } 2062 | declare module "core-js/fn/string/at" { 2063 | var at: typeof core.String.at; 2064 | export = at; 2065 | } 2066 | declare module "core-js/fn/string/code-point-at" { 2067 | var codePointAt: typeof core.String.codePointAt; 2068 | export = codePointAt; 2069 | } 2070 | declare module "core-js/fn/string/ends-with" { 2071 | var endsWith: typeof core.String.endsWith; 2072 | export = endsWith; 2073 | } 2074 | declare module "core-js/fn/string/escape-html" { 2075 | var escapeHTML: typeof core.String.escapeHTML; 2076 | export = escapeHTML; 2077 | } 2078 | declare module "core-js/fn/string/from-code-point" { 2079 | var fromCodePoint: typeof core.String.fromCodePoint; 2080 | export = fromCodePoint; 2081 | } 2082 | declare module "core-js/fn/string/includes" { 2083 | var includes: typeof core.String.includes; 2084 | export = includes; 2085 | } 2086 | declare module "core-js/fn/string/lpad" { 2087 | var lpad: typeof core.String.lpad; 2088 | export = lpad; 2089 | } 2090 | declare module "core-js/fn/string/raw" { 2091 | var raw: typeof core.String.raw; 2092 | export = raw; 2093 | } 2094 | declare module "core-js/fn/string/repeat" { 2095 | var repeat: typeof core.String.repeat; 2096 | export = repeat; 2097 | } 2098 | declare module "core-js/fn/string/rpad" { 2099 | var rpad: typeof core.String.rpad; 2100 | export = rpad; 2101 | } 2102 | declare module "core-js/fn/string/starts-with" { 2103 | var startsWith: typeof core.String.startsWith; 2104 | export = startsWith; 2105 | } 2106 | declare module "core-js/fn/string/unescape-html" { 2107 | var unescapeHTML: typeof core.String.unescapeHTML; 2108 | export = unescapeHTML; 2109 | } 2110 | declare module "core-js/fn/symbol" { 2111 | var Symbol: typeof core.Symbol; 2112 | export = Symbol; 2113 | } 2114 | declare module "core-js/fn/symbol/for" { 2115 | var _for: typeof core.Symbol.for; 2116 | export = _for; 2117 | } 2118 | declare module "core-js/fn/symbol/has-instance" { 2119 | var hasInstance: typeof core.Symbol.hasInstance; 2120 | export = hasInstance; 2121 | } 2122 | declare module "core-js/fn/symbol/is-concat-spreadable" { 2123 | var isConcatSpreadable: typeof core.Symbol.isConcatSpreadable; 2124 | export = isConcatSpreadable; 2125 | } 2126 | declare module "core-js/fn/symbol/iterator" { 2127 | var iterator: typeof core.Symbol.iterator; 2128 | export = iterator; 2129 | } 2130 | declare module "core-js/fn/symbol/key-for" { 2131 | var keyFor: typeof core.Symbol.keyFor; 2132 | export = keyFor; 2133 | } 2134 | declare module "core-js/fn/symbol/match" { 2135 | var match: typeof core.Symbol.match; 2136 | export = match; 2137 | } 2138 | declare module "core-js/fn/symbol/replace" { 2139 | var replace: typeof core.Symbol.replace; 2140 | export = replace; 2141 | } 2142 | declare module "core-js/fn/symbol/search" { 2143 | var search: typeof core.Symbol.search; 2144 | export = search; 2145 | } 2146 | declare module "core-js/fn/symbol/species" { 2147 | var species: typeof core.Symbol.species; 2148 | export = species; 2149 | } 2150 | declare module "core-js/fn/symbol/split" { 2151 | var split: typeof core.Symbol.split; 2152 | export = split; 2153 | } 2154 | declare module "core-js/fn/symbol/to-primitive" { 2155 | var toPrimitive: typeof core.Symbol.toPrimitive; 2156 | export = toPrimitive; 2157 | } 2158 | declare module "core-js/fn/symbol/to-string-tag" { 2159 | var toStringTag: typeof core.Symbol.toStringTag; 2160 | export = toStringTag; 2161 | } 2162 | declare module "core-js/fn/symbol/unscopables" { 2163 | var unscopables: typeof core.Symbol.unscopables; 2164 | export = unscopables; 2165 | } 2166 | declare module "core-js/es5" { 2167 | export = core; 2168 | } 2169 | declare module "core-js/es6" { 2170 | export = core; 2171 | } 2172 | declare module "core-js/es6/array" { 2173 | var Array: typeof core.Array; 2174 | export = Array; 2175 | } 2176 | declare module "core-js/es6/function" { 2177 | var Function: typeof core.Function; 2178 | export = Function; 2179 | } 2180 | declare module "core-js/es6/map" { 2181 | var Map: typeof core.Map; 2182 | export = Map; 2183 | } 2184 | declare module "core-js/es6/math" { 2185 | var Math: typeof core.Math; 2186 | export = Math; 2187 | } 2188 | declare module "core-js/es6/number" { 2189 | var Number: typeof core.Number; 2190 | export = Number; 2191 | } 2192 | declare module "core-js/es6/object" { 2193 | var Object: typeof core.Object; 2194 | export = Object; 2195 | } 2196 | declare module "core-js/es6/promise" { 2197 | var Promise: typeof core.Promise; 2198 | export = Promise; 2199 | } 2200 | declare module "core-js/es6/reflect" { 2201 | var Reflect: typeof core.Reflect; 2202 | export = Reflect; 2203 | } 2204 | declare module "core-js/es6/regexp" { 2205 | var RegExp: typeof core.RegExp; 2206 | export = RegExp; 2207 | } 2208 | declare module "core-js/es6/set" { 2209 | var Set: typeof core.Set; 2210 | export = Set; 2211 | } 2212 | declare module "core-js/es6/string" { 2213 | var String: typeof core.String; 2214 | export = String; 2215 | } 2216 | declare module "core-js/es6/symbol" { 2217 | var Symbol: typeof core.Symbol; 2218 | export = Symbol; 2219 | } 2220 | declare module "core-js/es6/weak-map" { 2221 | var WeakMap: typeof core.WeakMap; 2222 | export = WeakMap; 2223 | } 2224 | declare module "core-js/es6/weak-set" { 2225 | var WeakSet: typeof core.WeakSet; 2226 | export = WeakSet; 2227 | } 2228 | declare module "core-js/es7" { 2229 | export = core; 2230 | } 2231 | declare module "core-js/es7/array" { 2232 | var Array: typeof core.Array; 2233 | export = Array; 2234 | } 2235 | declare module "core-js/es7/map" { 2236 | var Map: typeof core.Map; 2237 | export = Map; 2238 | } 2239 | declare module "core-js/es7/object" { 2240 | var Object: typeof core.Object; 2241 | export = Object; 2242 | } 2243 | declare module "core-js/es7/regexp" { 2244 | var RegExp: typeof core.RegExp; 2245 | export = RegExp; 2246 | } 2247 | declare module "core-js/es7/set" { 2248 | var Set: typeof core.Set; 2249 | export = Set; 2250 | } 2251 | declare module "core-js/es7/string" { 2252 | var String: typeof core.String; 2253 | export = String; 2254 | } 2255 | declare module "core-js/js" { 2256 | export = core; 2257 | } 2258 | declare module "core-js/js/array" { 2259 | var Array: typeof core.Array; 2260 | export = Array; 2261 | } 2262 | declare module "core-js/web" { 2263 | export = core; 2264 | } 2265 | declare module "core-js/web/dom" { 2266 | export = core; 2267 | } 2268 | declare module "core-js/web/immediate" { 2269 | export = core; 2270 | } 2271 | declare module "core-js/web/timers" { 2272 | export = core; 2273 | } 2274 | declare module "core-js/library" { 2275 | export = core; 2276 | } 2277 | declare module "core-js/library/shim" { 2278 | export = core; 2279 | } 2280 | declare module "core-js/library/core" { 2281 | export = core; 2282 | } 2283 | declare module "core-js/library/core/$for" { 2284 | import $for = core.$for; 2285 | export = $for; 2286 | } 2287 | declare module "core-js/library/core/_" { 2288 | var _: typeof core._; 2289 | export = _; 2290 | } 2291 | declare module "core-js/library/core/array" { 2292 | var Array: typeof core.Array; 2293 | export = Array; 2294 | } 2295 | declare module "core-js/library/core/date" { 2296 | var Date: typeof core.Date; 2297 | export = Date; 2298 | } 2299 | declare module "core-js/library/core/delay" { 2300 | var delay: typeof core.delay; 2301 | export = delay; 2302 | } 2303 | declare module "core-js/library/core/dict" { 2304 | var Dict: typeof core.Dict; 2305 | export = Dict; 2306 | } 2307 | declare module "core-js/library/core/function" { 2308 | var Function: typeof core.Function; 2309 | export = Function; 2310 | } 2311 | declare module "core-js/library/core/global" { 2312 | var global: typeof core.global; 2313 | export = global; 2314 | } 2315 | declare module "core-js/library/core/log" { 2316 | var log: typeof core.log; 2317 | export = log; 2318 | } 2319 | declare module "core-js/library/core/number" { 2320 | var Number: typeof core.Number; 2321 | export = Number; 2322 | } 2323 | declare module "core-js/library/core/object" { 2324 | var Object: typeof core.Object; 2325 | export = Object; 2326 | } 2327 | declare module "core-js/library/core/string" { 2328 | var String: typeof core.String; 2329 | export = String; 2330 | } 2331 | declare module "core-js/library/fn/$for" { 2332 | import $for = core.$for; 2333 | export = $for; 2334 | } 2335 | declare module "core-js/library/fn/_" { 2336 | var _: typeof core._; 2337 | export = _; 2338 | } 2339 | declare module "core-js/library/fn/clear-immediate" { 2340 | var clearImmediate: typeof core.clearImmediate; 2341 | export = clearImmediate; 2342 | } 2343 | declare module "core-js/library/fn/delay" { 2344 | var delay: typeof core.delay; 2345 | export = delay; 2346 | } 2347 | declare module "core-js/library/fn/dict" { 2348 | var Dict: typeof core.Dict; 2349 | export = Dict; 2350 | } 2351 | declare module "core-js/library/fn/get-iterator" { 2352 | var getIterator: typeof core.getIterator; 2353 | export = getIterator; 2354 | } 2355 | declare module "core-js/library/fn/global" { 2356 | var global: typeof core.global; 2357 | export = global; 2358 | } 2359 | declare module "core-js/library/fn/is-iterable" { 2360 | var isIterable: typeof core.isIterable; 2361 | export = isIterable; 2362 | } 2363 | declare module "core-js/library/fn/log" { 2364 | var log: typeof core.log; 2365 | export = log; 2366 | } 2367 | declare module "core-js/library/fn/map" { 2368 | var Map: typeof core.Map; 2369 | export = Map; 2370 | } 2371 | declare module "core-js/library/fn/promise" { 2372 | var Promise: typeof core.Promise; 2373 | export = Promise; 2374 | } 2375 | declare module "core-js/library/fn/set" { 2376 | var Set: typeof core.Set; 2377 | export = Set; 2378 | } 2379 | declare module "core-js/library/fn/set-immediate" { 2380 | var setImmediate: typeof core.setImmediate; 2381 | export = setImmediate; 2382 | } 2383 | declare module "core-js/library/fn/set-interval" { 2384 | var setInterval: typeof core.setInterval; 2385 | export = setInterval; 2386 | } 2387 | declare module "core-js/library/fn/set-timeout" { 2388 | var setTimeout: typeof core.setTimeout; 2389 | export = setTimeout; 2390 | } 2391 | declare module "core-js/library/fn/weak-map" { 2392 | var WeakMap: typeof core.WeakMap; 2393 | export = WeakMap; 2394 | } 2395 | declare module "core-js/library/fn/weak-set" { 2396 | var WeakSet: typeof core.WeakSet; 2397 | export = WeakSet; 2398 | } 2399 | declare module "core-js/library/fn/array" { 2400 | var Array: typeof core.Array; 2401 | export = Array; 2402 | } 2403 | declare module "core-js/library/fn/array/concat" { 2404 | var concat: typeof core.Array.concat; 2405 | export = concat; 2406 | } 2407 | declare module "core-js/library/fn/array/copy-within" { 2408 | var copyWithin: typeof core.Array.copyWithin; 2409 | export = copyWithin; 2410 | } 2411 | declare module "core-js/library/fn/array/entries" { 2412 | var entries: typeof core.Array.entries; 2413 | export = entries; 2414 | } 2415 | declare module "core-js/library/fn/array/every" { 2416 | var every: typeof core.Array.every; 2417 | export = every; 2418 | } 2419 | declare module "core-js/library/fn/array/fill" { 2420 | var fill: typeof core.Array.fill; 2421 | export = fill; 2422 | } 2423 | declare module "core-js/library/fn/array/filter" { 2424 | var filter: typeof core.Array.filter; 2425 | export = filter; 2426 | } 2427 | declare module "core-js/library/fn/array/find" { 2428 | var find: typeof core.Array.find; 2429 | export = find; 2430 | } 2431 | declare module "core-js/library/fn/array/find-index" { 2432 | var findIndex: typeof core.Array.findIndex; 2433 | export = findIndex; 2434 | } 2435 | declare module "core-js/library/fn/array/for-each" { 2436 | var forEach: typeof core.Array.forEach; 2437 | export = forEach; 2438 | } 2439 | declare module "core-js/library/fn/array/from" { 2440 | var from: typeof core.Array.from; 2441 | export = from; 2442 | } 2443 | declare module "core-js/library/fn/array/includes" { 2444 | var includes: typeof core.Array.includes; 2445 | export = includes; 2446 | } 2447 | declare module "core-js/library/fn/array/index-of" { 2448 | var indexOf: typeof core.Array.indexOf; 2449 | export = indexOf; 2450 | } 2451 | declare module "core-js/library/fn/array/join" { 2452 | var join: typeof core.Array.join; 2453 | export = join; 2454 | } 2455 | declare module "core-js/library/fn/array/keys" { 2456 | var keys: typeof core.Array.keys; 2457 | export = keys; 2458 | } 2459 | declare module "core-js/library/fn/array/last-index-of" { 2460 | var lastIndexOf: typeof core.Array.lastIndexOf; 2461 | export = lastIndexOf; 2462 | } 2463 | declare module "core-js/library/fn/array/map" { 2464 | var map: typeof core.Array.map; 2465 | export = map; 2466 | } 2467 | declare module "core-js/library/fn/array/of" { 2468 | var of: typeof core.Array.of; 2469 | export = of; 2470 | } 2471 | declare module "core-js/library/fn/array/pop" { 2472 | var pop: typeof core.Array.pop; 2473 | export = pop; 2474 | } 2475 | declare module "core-js/library/fn/array/push" { 2476 | var push: typeof core.Array.push; 2477 | export = push; 2478 | } 2479 | declare module "core-js/library/fn/array/reduce" { 2480 | var reduce: typeof core.Array.reduce; 2481 | export = reduce; 2482 | } 2483 | declare module "core-js/library/fn/array/reduce-right" { 2484 | var reduceRight: typeof core.Array.reduceRight; 2485 | export = reduceRight; 2486 | } 2487 | declare module "core-js/library/fn/array/reverse" { 2488 | var reverse: typeof core.Array.reverse; 2489 | export = reverse; 2490 | } 2491 | declare module "core-js/library/fn/array/shift" { 2492 | var shift: typeof core.Array.shift; 2493 | export = shift; 2494 | } 2495 | declare module "core-js/library/fn/array/slice" { 2496 | var slice: typeof core.Array.slice; 2497 | export = slice; 2498 | } 2499 | declare module "core-js/library/fn/array/some" { 2500 | var some: typeof core.Array.some; 2501 | export = some; 2502 | } 2503 | declare module "core-js/library/fn/array/sort" { 2504 | var sort: typeof core.Array.sort; 2505 | export = sort; 2506 | } 2507 | declare module "core-js/library/fn/array/splice" { 2508 | var splice: typeof core.Array.splice; 2509 | export = splice; 2510 | } 2511 | declare module "core-js/library/fn/array/turn" { 2512 | var turn: typeof core.Array.turn; 2513 | export = turn; 2514 | } 2515 | declare module "core-js/library/fn/array/unshift" { 2516 | var unshift: typeof core.Array.unshift; 2517 | export = unshift; 2518 | } 2519 | declare module "core-js/library/fn/array/values" { 2520 | var values: typeof core.Array.values; 2521 | export = values; 2522 | } 2523 | declare module "core-js/library/fn/date" { 2524 | var Date: typeof core.Date; 2525 | export = Date; 2526 | } 2527 | declare module "core-js/library/fn/date/add-locale" { 2528 | var addLocale: typeof core.addLocale; 2529 | export = addLocale; 2530 | } 2531 | declare module "core-js/library/fn/date/format" { 2532 | var format: typeof core.Date.format; 2533 | export = format; 2534 | } 2535 | declare module "core-js/library/fn/date/formatUTC" { 2536 | var formatUTC: typeof core.Date.formatUTC; 2537 | export = formatUTC; 2538 | } 2539 | declare module "core-js/library/fn/function" { 2540 | var Function: typeof core.Function; 2541 | export = Function; 2542 | } 2543 | declare module "core-js/library/fn/function/has-instance" { 2544 | var hasInstance: (value: any) => boolean; 2545 | export = hasInstance; 2546 | } 2547 | declare module "core-js/library/fn/function/name" { 2548 | } 2549 | declare module "core-js/library/fn/function/part" { 2550 | var part: typeof core.Function.part; 2551 | export = part; 2552 | } 2553 | declare module "core-js/library/fn/math" { 2554 | var Math: typeof core.Math; 2555 | export = Math; 2556 | } 2557 | declare module "core-js/library/fn/math/acosh" { 2558 | var acosh: typeof core.Math.acosh; 2559 | export = acosh; 2560 | } 2561 | declare module "core-js/library/fn/math/asinh" { 2562 | var asinh: typeof core.Math.asinh; 2563 | export = asinh; 2564 | } 2565 | declare module "core-js/library/fn/math/atanh" { 2566 | var atanh: typeof core.Math.atanh; 2567 | export = atanh; 2568 | } 2569 | declare module "core-js/library/fn/math/cbrt" { 2570 | var cbrt: typeof core.Math.cbrt; 2571 | export = cbrt; 2572 | } 2573 | declare module "core-js/library/fn/math/clz32" { 2574 | var clz32: typeof core.Math.clz32; 2575 | export = clz32; 2576 | } 2577 | declare module "core-js/library/fn/math/cosh" { 2578 | var cosh: typeof core.Math.cosh; 2579 | export = cosh; 2580 | } 2581 | declare module "core-js/library/fn/math/expm1" { 2582 | var expm1: typeof core.Math.expm1; 2583 | export = expm1; 2584 | } 2585 | declare module "core-js/library/fn/math/fround" { 2586 | var fround: typeof core.Math.fround; 2587 | export = fround; 2588 | } 2589 | declare module "core-js/library/fn/math/hypot" { 2590 | var hypot: typeof core.Math.hypot; 2591 | export = hypot; 2592 | } 2593 | declare module "core-js/library/fn/math/imul" { 2594 | var imul: typeof core.Math.imul; 2595 | export = imul; 2596 | } 2597 | declare module "core-js/library/fn/math/log10" { 2598 | var log10: typeof core.Math.log10; 2599 | export = log10; 2600 | } 2601 | declare module "core-js/library/fn/math/log1p" { 2602 | var log1p: typeof core.Math.log1p; 2603 | export = log1p; 2604 | } 2605 | declare module "core-js/library/fn/math/log2" { 2606 | var log2: typeof core.Math.log2; 2607 | export = log2; 2608 | } 2609 | declare module "core-js/library/fn/math/sign" { 2610 | var sign: typeof core.Math.sign; 2611 | export = sign; 2612 | } 2613 | declare module "core-js/library/fn/math/sinh" { 2614 | var sinh: typeof core.Math.sinh; 2615 | export = sinh; 2616 | } 2617 | declare module "core-js/library/fn/math/tanh" { 2618 | var tanh: typeof core.Math.tanh; 2619 | export = tanh; 2620 | } 2621 | declare module "core-js/library/fn/math/trunc" { 2622 | var trunc: typeof core.Math.trunc; 2623 | export = trunc; 2624 | } 2625 | declare module "core-js/library/fn/number" { 2626 | var Number: typeof core.Number; 2627 | export = Number; 2628 | } 2629 | declare module "core-js/library/fn/number/epsilon" { 2630 | var EPSILON: typeof core.Number.EPSILON; 2631 | export = EPSILON; 2632 | } 2633 | declare module "core-js/library/fn/number/is-finite" { 2634 | var isFinite: typeof core.Number.isFinite; 2635 | export = isFinite; 2636 | } 2637 | declare module "core-js/library/fn/number/is-integer" { 2638 | var isInteger: typeof core.Number.isInteger; 2639 | export = isInteger; 2640 | } 2641 | declare module "core-js/library/fn/number/is-nan" { 2642 | var isNaN: typeof core.Number.isNaN; 2643 | export = isNaN; 2644 | } 2645 | declare module "core-js/library/fn/number/is-safe-integer" { 2646 | var isSafeInteger: typeof core.Number.isSafeInteger; 2647 | export = isSafeInteger; 2648 | } 2649 | declare module "core-js/library/fn/number/max-safe-integer" { 2650 | var MAX_SAFE_INTEGER: typeof core.Number.MAX_SAFE_INTEGER; 2651 | export = MAX_SAFE_INTEGER; 2652 | } 2653 | declare module "core-js/library/fn/number/min-safe-interger" { 2654 | var MIN_SAFE_INTEGER: typeof core.Number.MIN_SAFE_INTEGER; 2655 | export = MIN_SAFE_INTEGER; 2656 | } 2657 | declare module "core-js/library/fn/number/parse-float" { 2658 | var parseFloat: typeof core.Number.parseFloat; 2659 | export = parseFloat; 2660 | } 2661 | declare module "core-js/library/fn/number/parse-int" { 2662 | var parseInt: typeof core.Number.parseInt; 2663 | export = parseInt; 2664 | } 2665 | declare module "core-js/library/fn/number/random" { 2666 | var random: typeof core.Number.random; 2667 | export = random; 2668 | } 2669 | declare module "core-js/library/fn/object" { 2670 | var Object: typeof core.Object; 2671 | export = Object; 2672 | } 2673 | declare module "core-js/library/fn/object/assign" { 2674 | var assign: typeof core.Object.assign; 2675 | export = assign; 2676 | } 2677 | declare module "core-js/library/fn/object/classof" { 2678 | var classof: typeof core.Object.classof; 2679 | export = classof; 2680 | } 2681 | declare module "core-js/library/fn/object/create" { 2682 | var create: typeof core.Object.create; 2683 | export = create; 2684 | } 2685 | declare module "core-js/library/fn/object/define" { 2686 | var define: typeof core.Object.define; 2687 | export = define; 2688 | } 2689 | declare module "core-js/library/fn/object/define-properties" { 2690 | var defineProperties: typeof core.Object.defineProperties; 2691 | export = defineProperties; 2692 | } 2693 | declare module "core-js/library/fn/object/define-property" { 2694 | var defineProperty: typeof core.Object.defineProperty; 2695 | export = defineProperty; 2696 | } 2697 | declare module "core-js/library/fn/object/entries" { 2698 | var entries: typeof core.Object.entries; 2699 | export = entries; 2700 | } 2701 | declare module "core-js/library/fn/object/freeze" { 2702 | var freeze: typeof core.Object.freeze; 2703 | export = freeze; 2704 | } 2705 | declare module "core-js/library/fn/object/get-own-property-descriptor" { 2706 | var getOwnPropertyDescriptor: typeof core.Object.getOwnPropertyDescriptor; 2707 | export = getOwnPropertyDescriptor; 2708 | } 2709 | declare module "core-js/library/fn/object/get-own-property-descriptors" { 2710 | var getOwnPropertyDescriptors: typeof core.Object.getOwnPropertyDescriptors; 2711 | export = getOwnPropertyDescriptors; 2712 | } 2713 | declare module "core-js/library/fn/object/get-own-property-names" { 2714 | var getOwnPropertyNames: typeof core.Object.getOwnPropertyNames; 2715 | export = getOwnPropertyNames; 2716 | } 2717 | declare module "core-js/library/fn/object/get-own-property-symbols" { 2718 | var getOwnPropertySymbols: typeof core.Object.getOwnPropertySymbols; 2719 | export = getOwnPropertySymbols; 2720 | } 2721 | declare module "core-js/library/fn/object/get-prototype-of" { 2722 | var getPrototypeOf: typeof core.Object.getPrototypeOf; 2723 | export = getPrototypeOf; 2724 | } 2725 | declare module "core-js/library/fn/object/is" { 2726 | var is: typeof core.Object.is; 2727 | export = is; 2728 | } 2729 | declare module "core-js/library/fn/object/is-extensible" { 2730 | var isExtensible: typeof core.Object.isExtensible; 2731 | export = isExtensible; 2732 | } 2733 | declare module "core-js/library/fn/object/is-frozen" { 2734 | var isFrozen: typeof core.Object.isFrozen; 2735 | export = isFrozen; 2736 | } 2737 | declare module "core-js/library/fn/object/is-object" { 2738 | var isObject: typeof core.Object.isObject; 2739 | export = isObject; 2740 | } 2741 | declare module "core-js/library/fn/object/is-sealed" { 2742 | var isSealed: typeof core.Object.isSealed; 2743 | export = isSealed; 2744 | } 2745 | declare module "core-js/library/fn/object/keys" { 2746 | var keys: typeof core.Object.keys; 2747 | export = keys; 2748 | } 2749 | declare module "core-js/library/fn/object/make" { 2750 | var make: typeof core.Object.make; 2751 | export = make; 2752 | } 2753 | declare module "core-js/library/fn/object/prevent-extensions" { 2754 | var preventExtensions: typeof core.Object.preventExtensions; 2755 | export = preventExtensions; 2756 | } 2757 | declare module "core-js/library/fn/object/seal" { 2758 | var seal: typeof core.Object.seal; 2759 | export = seal; 2760 | } 2761 | declare module "core-js/library/fn/object/set-prototype-of" { 2762 | var setPrototypeOf: typeof core.Object.setPrototypeOf; 2763 | export = setPrototypeOf; 2764 | } 2765 | declare module "core-js/library/fn/object/values" { 2766 | var values: typeof core.Object.values; 2767 | export = values; 2768 | } 2769 | declare module "core-js/library/fn/reflect" { 2770 | var Reflect: typeof core.Reflect; 2771 | export = Reflect; 2772 | } 2773 | declare module "core-js/library/fn/reflect/apply" { 2774 | var apply: typeof core.Reflect.apply; 2775 | export = apply; 2776 | } 2777 | declare module "core-js/library/fn/reflect/construct" { 2778 | var construct: typeof core.Reflect.construct; 2779 | export = construct; 2780 | } 2781 | declare module "core-js/library/fn/reflect/define-property" { 2782 | var defineProperty: typeof core.Reflect.defineProperty; 2783 | export = defineProperty; 2784 | } 2785 | declare module "core-js/library/fn/reflect/delete-property" { 2786 | var deleteProperty: typeof core.Reflect.deleteProperty; 2787 | export = deleteProperty; 2788 | } 2789 | declare module "core-js/library/fn/reflect/enumerate" { 2790 | var enumerate: typeof core.Reflect.enumerate; 2791 | export = enumerate; 2792 | } 2793 | declare module "core-js/library/fn/reflect/get" { 2794 | var get: typeof core.Reflect.get; 2795 | export = get; 2796 | } 2797 | declare module "core-js/library/fn/reflect/get-own-property-descriptor" { 2798 | var getOwnPropertyDescriptor: typeof core.Reflect.getOwnPropertyDescriptor; 2799 | export = getOwnPropertyDescriptor; 2800 | } 2801 | declare module "core-js/library/fn/reflect/get-prototype-of" { 2802 | var getPrototypeOf: typeof core.Reflect.getPrototypeOf; 2803 | export = getPrototypeOf; 2804 | } 2805 | declare module "core-js/library/fn/reflect/has" { 2806 | var has: typeof core.Reflect.has; 2807 | export = has; 2808 | } 2809 | declare module "core-js/library/fn/reflect/is-extensible" { 2810 | var isExtensible: typeof core.Reflect.isExtensible; 2811 | export = isExtensible; 2812 | } 2813 | declare module "core-js/library/fn/reflect/own-keys" { 2814 | var ownKeys: typeof core.Reflect.ownKeys; 2815 | export = ownKeys; 2816 | } 2817 | declare module "core-js/library/fn/reflect/prevent-extensions" { 2818 | var preventExtensions: typeof core.Reflect.preventExtensions; 2819 | export = preventExtensions; 2820 | } 2821 | declare module "core-js/library/fn/reflect/set" { 2822 | var set: typeof core.Reflect.set; 2823 | export = set; 2824 | } 2825 | declare module "core-js/library/fn/reflect/set-prototype-of" { 2826 | var setPrototypeOf: typeof core.Reflect.setPrototypeOf; 2827 | export = setPrototypeOf; 2828 | } 2829 | declare module "core-js/library/fn/regexp" { 2830 | var RegExp: typeof core.RegExp; 2831 | export = RegExp; 2832 | } 2833 | declare module "core-js/library/fn/regexp/escape" { 2834 | var escape: typeof core.RegExp.escape; 2835 | export = escape; 2836 | } 2837 | declare module "core-js/library/fn/string" { 2838 | var String: typeof core.String; 2839 | export = String; 2840 | } 2841 | declare module "core-js/library/fn/string/at" { 2842 | var at: typeof core.String.at; 2843 | export = at; 2844 | } 2845 | declare module "core-js/library/fn/string/code-point-at" { 2846 | var codePointAt: typeof core.String.codePointAt; 2847 | export = codePointAt; 2848 | } 2849 | declare module "core-js/library/fn/string/ends-with" { 2850 | var endsWith: typeof core.String.endsWith; 2851 | export = endsWith; 2852 | } 2853 | declare module "core-js/library/fn/string/escape-html" { 2854 | var escapeHTML: typeof core.String.escapeHTML; 2855 | export = escapeHTML; 2856 | } 2857 | declare module "core-js/library/fn/string/from-code-point" { 2858 | var fromCodePoint: typeof core.String.fromCodePoint; 2859 | export = fromCodePoint; 2860 | } 2861 | declare module "core-js/library/fn/string/includes" { 2862 | var includes: typeof core.String.includes; 2863 | export = includes; 2864 | } 2865 | declare module "core-js/library/fn/string/lpad" { 2866 | var lpad: typeof core.String.lpad; 2867 | export = lpad; 2868 | } 2869 | declare module "core-js/library/fn/string/raw" { 2870 | var raw: typeof core.String.raw; 2871 | export = raw; 2872 | } 2873 | declare module "core-js/library/fn/string/repeat" { 2874 | var repeat: typeof core.String.repeat; 2875 | export = repeat; 2876 | } 2877 | declare module "core-js/library/fn/string/rpad" { 2878 | var rpad: typeof core.String.rpad; 2879 | export = rpad; 2880 | } 2881 | declare module "core-js/library/fn/string/starts-with" { 2882 | var startsWith: typeof core.String.startsWith; 2883 | export = startsWith; 2884 | } 2885 | declare module "core-js/library/fn/string/unescape-html" { 2886 | var unescapeHTML: typeof core.String.unescapeHTML; 2887 | export = unescapeHTML; 2888 | } 2889 | declare module "core-js/library/fn/symbol" { 2890 | var Symbol: typeof core.Symbol; 2891 | export = Symbol; 2892 | } 2893 | declare module "core-js/library/fn/symbol/for" { 2894 | var _for: typeof core.Symbol.for; 2895 | export = _for; 2896 | } 2897 | declare module "core-js/library/fn/symbol/has-instance" { 2898 | var hasInstance: typeof core.Symbol.hasInstance; 2899 | export = hasInstance; 2900 | } 2901 | declare module "core-js/library/fn/symbol/is-concat-spreadable" { 2902 | var isConcatSpreadable: typeof core.Symbol.isConcatSpreadable; 2903 | export = isConcatSpreadable; 2904 | } 2905 | declare module "core-js/library/fn/symbol/iterator" { 2906 | var iterator: typeof core.Symbol.iterator; 2907 | export = iterator; 2908 | } 2909 | declare module "core-js/library/fn/symbol/key-for" { 2910 | var keyFor: typeof core.Symbol.keyFor; 2911 | export = keyFor; 2912 | } 2913 | declare module "core-js/library/fn/symbol/match" { 2914 | var match: typeof core.Symbol.match; 2915 | export = match; 2916 | } 2917 | declare module "core-js/library/fn/symbol/replace" { 2918 | var replace: typeof core.Symbol.replace; 2919 | export = replace; 2920 | } 2921 | declare module "core-js/library/fn/symbol/search" { 2922 | var search: typeof core.Symbol.search; 2923 | export = search; 2924 | } 2925 | declare module "core-js/library/fn/symbol/species" { 2926 | var species: typeof core.Symbol.species; 2927 | export = species; 2928 | } 2929 | declare module "core-js/library/fn/symbol/split" { 2930 | var split: typeof core.Symbol.split; 2931 | export = split; 2932 | } 2933 | declare module "core-js/library/fn/symbol/to-primitive" { 2934 | var toPrimitive: typeof core.Symbol.toPrimitive; 2935 | export = toPrimitive; 2936 | } 2937 | declare module "core-js/library/fn/symbol/to-string-tag" { 2938 | var toStringTag: typeof core.Symbol.toStringTag; 2939 | export = toStringTag; 2940 | } 2941 | declare module "core-js/library/fn/symbol/unscopables" { 2942 | var unscopables: typeof core.Symbol.unscopables; 2943 | export = unscopables; 2944 | } 2945 | declare module "core-js/library/es5" { 2946 | export = core; 2947 | } 2948 | declare module "core-js/library/es6" { 2949 | export = core; 2950 | } 2951 | declare module "core-js/library/es6/array" { 2952 | var Array: typeof core.Array; 2953 | export = Array; 2954 | } 2955 | declare module "core-js/library/es6/function" { 2956 | var Function: typeof core.Function; 2957 | export = Function; 2958 | } 2959 | declare module "core-js/library/es6/map" { 2960 | var Map: typeof core.Map; 2961 | export = Map; 2962 | } 2963 | declare module "core-js/library/es6/math" { 2964 | var Math: typeof core.Math; 2965 | export = Math; 2966 | } 2967 | declare module "core-js/library/es6/number" { 2968 | var Number: typeof core.Number; 2969 | export = Number; 2970 | } 2971 | declare module "core-js/library/es6/object" { 2972 | var Object: typeof core.Object; 2973 | export = Object; 2974 | } 2975 | declare module "core-js/library/es6/promise" { 2976 | var Promise: typeof core.Promise; 2977 | export = Promise; 2978 | } 2979 | declare module "core-js/library/es6/reflect" { 2980 | var Reflect: typeof core.Reflect; 2981 | export = Reflect; 2982 | } 2983 | declare module "core-js/library/es6/regexp" { 2984 | var RegExp: typeof core.RegExp; 2985 | export = RegExp; 2986 | } 2987 | declare module "core-js/library/es6/set" { 2988 | var Set: typeof core.Set; 2989 | export = Set; 2990 | } 2991 | declare module "core-js/library/es6/string" { 2992 | var String: typeof core.String; 2993 | export = String; 2994 | } 2995 | declare module "core-js/library/es6/symbol" { 2996 | var Symbol: typeof core.Symbol; 2997 | export = Symbol; 2998 | } 2999 | declare module "core-js/library/es6/weak-map" { 3000 | var WeakMap: typeof core.WeakMap; 3001 | export = WeakMap; 3002 | } 3003 | declare module "core-js/library/es6/weak-set" { 3004 | var WeakSet: typeof core.WeakSet; 3005 | export = WeakSet; 3006 | } 3007 | declare module "core-js/library/es7" { 3008 | export = core; 3009 | } 3010 | declare module "core-js/library/es7/array" { 3011 | var Array: typeof core.Array; 3012 | export = Array; 3013 | } 3014 | declare module "core-js/library/es7/map" { 3015 | var Map: typeof core.Map; 3016 | export = Map; 3017 | } 3018 | declare module "core-js/library/es7/object" { 3019 | var Object: typeof core.Object; 3020 | export = Object; 3021 | } 3022 | declare module "core-js/library/es7/regexp" { 3023 | var RegExp: typeof core.RegExp; 3024 | export = RegExp; 3025 | } 3026 | declare module "core-js/library/es7/set" { 3027 | var Set: typeof core.Set; 3028 | export = Set; 3029 | } 3030 | declare module "core-js/library/es7/string" { 3031 | var String: typeof core.String; 3032 | export = String; 3033 | } 3034 | declare module "core-js/library/js" { 3035 | export = core; 3036 | } 3037 | declare module "core-js/library/js/array" { 3038 | var Array: typeof core.Array; 3039 | export = Array; 3040 | } 3041 | declare module "core-js/library/web" { 3042 | export = core; 3043 | } 3044 | declare module "core-js/library/web/dom" { 3045 | export = core; 3046 | } 3047 | declare module "core-js/library/web/immediate" { 3048 | export = core; 3049 | } 3050 | declare module "core-js/library/web/timers" { 3051 | export = core; 3052 | } 3053 | -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/typings/globals/core-js/typings.json: -------------------------------------------------------------------------------- 1 | { 2 | "resolution": "main", 3 | "tree": { 4 | "src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/25e18b592470e3dddccc826fde2bb8e7610ef863/core-js/core-js.d.ts", 5 | "raw": "registry:dt/core-js#0.0.0+20160725163759", 6 | "typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/25e18b592470e3dddccc826fde2bb8e7610ef863/core-js/core-js.d.ts" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/typings/index.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/wwwroot/app/app.component.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | var __metadata = (this && this.__metadata) || function (k, v) { 9 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); 10 | }; 11 | var core_1 = require('@angular/core'); 12 | var AppComponent = (function () { 13 | function AppComponent() { 14 | } 15 | AppComponent = __decorate([ 16 | core_1.Component({ 17 | selector: 'app-container', 18 | template: "" 19 | }), 20 | __metadata('design:paramtypes', []) 21 | ], AppComponent); 22 | return AppComponent; 23 | }()); 24 | exports.AppComponent = AppComponent; 25 | //# sourceMappingURL=app.component.js.map -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/wwwroot/app/app.component.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"app.component.js","sourceRoot":"","sources":["app.component.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,qBAA0B,eAAe,CAAC,CAAA;AAM1C;IAEE;IAEA,CAAC;IARH;QAAC,gBAAS,CAAC;YACT,QAAQ,EAAE,eAAe;YACzB,QAAQ,EAAE,iCAAiC;SAC5C,CAAC;;oBAAA;IAOF,mBAAC;AAAD,CAAC,AAND,IAMC;AANY,oBAAY,eAMxB,CAAA"} -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/wwwroot/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-container', 5 | template: `` 6 | }) 7 | export class AppComponent { 8 | 9 | constructor() { 10 | 11 | } 12 | 13 | } -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/wwwroot/app/app.module.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | var __metadata = (this && this.__metadata) || function (k, v) { 9 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); 10 | }; 11 | var core_1 = require('@angular/core'); 12 | var platform_browser_1 = require('@angular/platform-browser'); 13 | var forms_1 = require('@angular/forms'); 14 | var http_1 = require('@angular/http'); 15 | var app_component_1 = require('./app.component'); 16 | var customers_component_1 = require('./customers/customers.component'); 17 | var app_routing_1 = require('./app.routing'); 18 | var customers_service_1 = require('./shared/customers.service'); 19 | var AppModule = (function () { 20 | function AppModule() { 21 | } 22 | AppModule = __decorate([ 23 | core_1.NgModule({ 24 | imports: [platform_browser_1.BrowserModule, forms_1.FormsModule, http_1.HttpModule, app_routing_1.app_routing], 25 | declarations: [app_component_1.AppComponent, customers_component_1.CustomersComponent], 26 | providers: [customers_service_1.CustomersService], 27 | bootstrap: [app_component_1.AppComponent] 28 | }), 29 | __metadata('design:paramtypes', []) 30 | ], AppModule); 31 | return AppModule; 32 | }()); 33 | exports.AppModule = AppModule; 34 | //# sourceMappingURL=app.module.js.map -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/wwwroot/app/app.module.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"app.module.js","sourceRoot":"","sources":["app.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,qBAA8B,eAAe,CAAC,CAAA;AAC9C,iCAA8B,2BAA2B,CAAC,CAAA;AAC1D,sBAA4B,gBAAgB,CAAC,CAAA;AAC7C,qBAA0B,eAAe,CAAC,CAAA;AAE1C,8BAA8B,iBAAiB,CAAC,CAAA;AAChD,oCAAmC,iCAAiC,CAAC,CAAA;AACrE,4BAA4B,eAAe,CAAC,CAAA;AAC5C,kCAAiC,4BAA4B,CAAC,CAAA;AAQ9D;IAAA;IAAyB,CAAC;IAN1B;QAAC,eAAQ,CAAC;YACR,OAAO,EAAO,CAAE,gCAAa,EAAE,mBAAW,EAAE,iBAAU,EAAE,yBAAW,CAAE;YACrE,YAAY,EAAE,CAAE,4BAAY,EAAE,wCAAkB,CAAE;YAClD,SAAS,EAAK,CAAE,oCAAgB,CAAE;YAClC,SAAS,EAAK,CAAE,4BAAY,CAAE;SAC/B,CAAC;;iBAAA;IACuB,gBAAC;AAAD,CAAC,AAA1B,IAA0B;AAAb,iBAAS,YAAI,CAAA"} -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/wwwroot/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { BrowserModule } from '@angular/platform-browser'; 3 | import { FormsModule } from '@angular/forms'; 4 | import { HttpModule} from '@angular/http'; 5 | 6 | import { AppComponent } from './app.component'; 7 | import { CustomersComponent } from './customers/customers.component'; 8 | import { app_routing } from './app.routing'; 9 | import { CustomersService } from './shared/customers.service'; 10 | 11 | @NgModule({ 12 | imports: [ BrowserModule, FormsModule, HttpModule, app_routing ], 13 | declarations: [ AppComponent, CustomersComponent ], 14 | providers: [ CustomersService ], 15 | bootstrap: [ AppComponent ] 16 | }) 17 | export class AppModule { } -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/wwwroot/app/app.routing.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var router_1 = require('@angular/router'); 3 | var customers_component_1 = require('./customers/customers.component'); 4 | var app_routes = [ 5 | { path: '', component: customers_component_1.CustomersComponent } 6 | ]; 7 | exports.app_routing = router_1.RouterModule.forRoot(app_routes); 8 | //# sourceMappingURL=app.routing.js.map -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/wwwroot/app/app.routing.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"app.routing.js","sourceRoot":"","sources":["app.routing.ts"],"names":[],"mappings":";AAAA,uBAAqC,iBAAiB,CAAC,CAAA;AAEvD,oCAAuC,iCAAiC,CAAC,CAAA;AAEzE,IAAM,UAAU,GAAW;IACzB,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,wCAAkB,EAAE;CAC5C,CAAC;AAEW,mBAAW,GAAG,qBAAY,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC"} -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/wwwroot/app/app.routing.ts: -------------------------------------------------------------------------------- 1 | import { RouterModule, Routes } from '@angular/router'; 2 | 3 | import { CustomersComponent } from './customers/customers.component'; 4 | 5 | const app_routes: Routes = [ 6 | { path: '', component: CustomersComponent } 7 | ]; 8 | 9 | export const app_routing = RouterModule.forRoot(app_routes); -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/wwwroot/app/customers/customers.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 6 |

7 | 8 | 9 | 10 | 11 |

12 | {{ date | date:'hh:mm:ss' }} 13 |

14 |
15 | {{ data | json }}
16 | 
-------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/wwwroot/app/customers/customers.component.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | var __metadata = (this && this.__metadata) || function (k, v) { 9 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); 10 | }; 11 | var core_1 = require('@angular/core'); 12 | var customers_service_1 = require('../shared/customers.service'); 13 | var CustomersComponent = (function () { 14 | function CustomersComponent(customersService) { 15 | this.customersService = customersService; 16 | } 17 | CustomersComponent.prototype.ngOnInit = function () { 18 | }; 19 | CustomersComponent.prototype.getCustomers = function () { 20 | var _this = this; 21 | this.customersService.getCustomers() 22 | .subscribe(function (custs) { return _this.dumpData(custs); }); 23 | }; 24 | CustomersComponent.prototype.getCustomersWithPromise = function () { 25 | var _this = this; 26 | this.customersService.getCustomersWithPromise() 27 | .then(function (custs) { return _this.dumpData(custs); }); 28 | }; 29 | CustomersComponent.prototype.getCustomer = function (id) { 30 | var _this = this; 31 | this.customersService.getCustomer(id) 32 | .subscribe(function (cust) { return _this.dumpData(cust); }); 33 | }; 34 | CustomersComponent.prototype.postCustomer = function () { 35 | var _this = this; 36 | var customer = { firstName: "Ken", lastName: "Doe", address: { "id": 100, "city": "Chandler", "state": "AZ", "zip": 85249 } }; 37 | this.customersService.postCustomer(customer) 38 | .subscribe(function (cust) { return _this.dumpData(cust); }); 39 | }; 40 | CustomersComponent.prototype.putCustomer = function () { 41 | var _this = this; 42 | var customer = { id: 1, firstName: "David", lastName: "Doe", address: { id: 100, city: "Chandler", state: "AZ", zip: 85249 } }; 43 | this.customersService.putCustomer(customer) 44 | .subscribe(function (cust) { return _this.dumpData(cust); }); 45 | }; 46 | CustomersComponent.prototype.deleteCustomer = function () { 47 | var _this = this; 48 | var id = 3; 49 | this.customersService.deleteCustomer(id) 50 | .subscribe(function (message) { return _this.dumpData(message); }); 51 | }; 52 | CustomersComponent.prototype.dumpData = function (data) { 53 | this.date = Date.now(); 54 | this.data = data; 55 | }; 56 | CustomersComponent = __decorate([ 57 | core_1.Component({ 58 | moduleId: module.id, 59 | selector: 'customers', 60 | templateUrl: 'customers.component.html' 61 | }), 62 | __metadata('design:paramtypes', [customers_service_1.CustomersService]) 63 | ], CustomersComponent); 64 | return CustomersComponent; 65 | }()); 66 | exports.CustomersComponent = CustomersComponent; 67 | //# sourceMappingURL=customers.component.js.map -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/wwwroot/app/customers/customers.component.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"customers.component.js","sourceRoot":"","sources":["customers.component.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,qBAAkC,eAAe,CAAC,CAAA;AAElD,kCAAiC,6BAA6B,CAAC,CAAA;AAQ/D;IAKI,4BAAoB,gBAAkC;QAAlC,qBAAgB,GAAhB,gBAAgB,CAAkB;IAAI,CAAC;IAE3D,qCAAQ,GAAR;IAEA,CAAC;IAED,yCAAY,GAAZ;QAAA,iBAGC;QAFG,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE;aAC/B,SAAS,CAAC,UAAC,KAAkB,IAAK,OAAA,KAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAApB,CAAoB,CAAC,CAAC;IACjE,CAAC;IAED,oDAAuB,GAAvB;QAAA,iBAGC;QAFG,IAAI,CAAC,gBAAgB,CAAC,uBAAuB,EAAE;aAC1C,IAAI,CAAC,UAAC,KAAkB,IAAK,OAAA,KAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAApB,CAAoB,CAAC,CAAC;IAC5D,CAAC;IAED,wCAAW,GAAX,UAAY,EAAU;QAAtB,iBAGC;QAFG,IAAI,CAAC,gBAAgB,CAAC,WAAW,CAAC,EAAE,CAAC;aAChC,SAAS,CAAC,UAAC,IAAe,IAAK,OAAA,KAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAnB,CAAmB,CAAC,CAAC;IAC7D,CAAC;IAED,yCAAY,GAAZ;QAAA,iBAIC;QAHG,IAAM,QAAQ,GAAc,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC;QAC3I,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,QAAQ,CAAC;aACvC,SAAS,CAAC,UAAC,IAAe,IAAK,OAAA,KAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAnB,CAAmB,CAAC,CAAC;IAC7D,CAAC;IAED,wCAAW,GAAX;QAAA,iBAIC;QAHG,IAAM,QAAQ,GAAc,EAAE,EAAE,EAAE,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC;QAC5I,IAAI,CAAC,gBAAgB,CAAC,WAAW,CAAC,QAAQ,CAAC;aACtC,SAAS,CAAC,UAAC,IAAe,IAAK,OAAA,KAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAnB,CAAmB,CAAC,CAAC;IAC7D,CAAC;IAED,2CAAc,GAAd;QAAA,iBAIC;QAHG,IAAI,EAAE,GAAG,CAAC,CAAC;QACX,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,EAAE,CAAC;aACnC,SAAS,CAAC,UAAC,OAAe,IAAK,OAAA,KAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAtB,CAAsB,CAAC,CAAC;IAChE,CAAC;IAED,qCAAQ,GAAR,UAAS,IAAS;QACd,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACrB,CAAC;IApDL;QAAC,gBAAS,CAAC;YACP,QAAQ,EAAE,MAAM,CAAC,EAAE;YACnB,QAAQ,EAAE,WAAW;YACrB,WAAW,EAAE,0BAA0B;SAC1C,CAAC;;0BAAA;IAkDF,yBAAC;AAAD,CAAC,AAjDD,IAiDC;AAjDY,0BAAkB,qBAiD9B,CAAA"} -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/wwwroot/app/customers/customers.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | 3 | import { CustomersService } from '../shared/customers.service'; 4 | import { ICustomer } from '../shared/interfaces'; 5 | 6 | @Component({ 7 | moduleId: module.id, 8 | selector: 'customers', 9 | templateUrl: 'customers.component.html' 10 | }) 11 | export class CustomersComponent implements OnInit { 12 | 13 | date: number; 14 | data: string; 15 | 16 | constructor(private customersService: CustomersService) { } 17 | 18 | ngOnInit() { 19 | 20 | } 21 | 22 | getCustomers() { 23 | this.customersService.getCustomers() 24 | .subscribe((custs: ICustomer[]) => this.dumpData(custs)); 25 | } 26 | 27 | getCustomersWithPromise() { 28 | this.customersService.getCustomersWithPromise() 29 | .then((custs: ICustomer[]) => this.dumpData(custs)); 30 | } 31 | 32 | getCustomer(id: number) { 33 | this.customersService.getCustomer(id) 34 | .subscribe((cust: ICustomer) => this.dumpData(cust)); 35 | } 36 | 37 | postCustomer() { 38 | const customer: ICustomer = { firstName: "Ken", lastName: "Doe", address: { "id": 100, "city": "Chandler", "state": "AZ", "zip": 85249 } }; 39 | this.customersService.postCustomer(customer) 40 | .subscribe((cust: ICustomer) => this.dumpData(cust)); 41 | } 42 | 43 | putCustomer() { 44 | const customer: ICustomer = { id: 1, firstName: "David", lastName: "Doe", address: { id: 100, city: "Chandler", state: "AZ", zip: 85249 } }; 45 | this.customersService.putCustomer(customer) 46 | .subscribe((cust: ICustomer) => this.dumpData(cust)); 47 | } 48 | 49 | deleteCustomer() { 50 | let id = 3; 51 | this.customersService.deleteCustomer(id) 52 | .subscribe((message: string) => this.dumpData(message)); 53 | } 54 | 55 | dumpData(data: any) { 56 | this.date = Date.now(); 57 | this.data = data; 58 | } 59 | 60 | } -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/wwwroot/app/main.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var platform_browser_dynamic_1 = require('@angular/platform-browser-dynamic'); 3 | var app_module_1 = require('./app.module'); 4 | //enableProdMode(); //Uncomment for production 5 | platform_browser_dynamic_1.platformBrowserDynamic().bootstrapModule(app_module_1.AppModule) 6 | .then(function (success) { return console.log('App bootstrapped'); }) 7 | .catch(function (err) { return console.error(err); }); 8 | //# sourceMappingURL=main.js.map -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/wwwroot/app/main.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"main.js","sourceRoot":"","sources":["main.ts"],"names":[],"mappings":";AAAA,yCAAuC,mCAAmC,CAAC,CAAA;AAC3E,2BAA0B,cAAc,CAAC,CAAA;AAGzC,8CAA8C;AAC9C,iDAAsB,EAAE,CAAC,eAAe,CAAC,sBAAS,CAAC;KAChD,IAAI,CAAC,UAAC,OAAY,IAAK,OAAA,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,EAA/B,CAA+B,CAAC;KACvD,KAAK,CAAC,UAAC,GAAQ,IAAK,OAAA,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,EAAlB,CAAkB,CAAC,CAAC"} -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/wwwroot/app/main.ts: -------------------------------------------------------------------------------- 1 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 2 | import { AppModule } from './app.module'; 3 | import { enableProdMode } from '@angular/core'; 4 | 5 | //enableProdMode(); //Uncomment for production 6 | platformBrowserDynamic().bootstrapModule(AppModule) 7 | .then((success: any) => console.log('App bootstrapped')) 8 | .catch((err: any) => console.error(err)); -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/wwwroot/app/shared/customers.service.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | var __metadata = (this && this.__metadata) || function (k, v) { 9 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); 10 | }; 11 | var core_1 = require('@angular/core'); 12 | var http_1 = require('@angular/http'); 13 | require('rxjs/add/operator/map'); 14 | require('rxjs/add/operator/catch'); 15 | require('rxjs/add/operator/toPromise'); 16 | var Rx_1 = require('rxjs/Rx'); 17 | var CustomersService = (function () { 18 | function CustomersService(http) { 19 | this.http = http; 20 | this.url = '/api/customers'; 21 | } 22 | CustomersService.prototype.getCustomers = function () { 23 | return this.http.get(this.url) 24 | .map(function (resp) { return resp.json(); }) 25 | .catch(this.handleError); 26 | }; 27 | CustomersService.prototype.getCustomersWithPromise = function () { 28 | return this.http.get(this.url) 29 | .toPromise() 30 | .then(function (resp) { return resp.json(); }) 31 | .catch(this.handleError); 32 | }; 33 | CustomersService.prototype.getCustomer = function (id) { 34 | return this.http.get(this.url + "/" + id) 35 | .map(function (resp) { return resp.json(); }) 36 | .catch(this.handleError); 37 | }; 38 | CustomersService.prototype.postCustomer = function (customer) { 39 | return this.http.post(this.url, customer) 40 | .map(function (resp) { return resp.json(); }) 41 | .catch(this.handleError); 42 | }; 43 | CustomersService.prototype.putCustomer = function (customer) { 44 | return this.http.put(this.url + "/" + customer.id, customer) 45 | .map(function (resp) { return resp.json(); }) 46 | .catch(this.handleError); 47 | }; 48 | CustomersService.prototype.deleteCustomer = function (id) { 49 | return this.http.delete(this.url + "/" + id) 50 | .map(function (resp) { return resp; }) 51 | .catch(this.handleError); 52 | }; 53 | CustomersService.prototype.handleError = function (error) { 54 | var message = (error.message) ? error.message : 55 | error.status ? error.status + " - " + error.statusText : 'Server error'; 56 | console.error(message); 57 | return Rx_1.Observable.throw(message); 58 | }; 59 | CustomersService = __decorate([ 60 | core_1.Injectable(), 61 | __metadata('design:paramtypes', [http_1.Http]) 62 | ], CustomersService); 63 | return CustomersService; 64 | }()); 65 | exports.CustomersService = CustomersService; 66 | //# sourceMappingURL=customers.service.js.map -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/wwwroot/app/shared/customers.service.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"customers.service.js","sourceRoot":"","sources":["customers.service.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,qBAA2B,eAAe,CAAC,CAAA;AAC3C,qBAA+B,eAAe,CAAC,CAAA;AAE/C,QAAO,uBAAuB,CAAC,CAAA;AAC/B,QAAO,yBAAyB,CAAC,CAAA;AACjC,QAAO,6BAA6B,CAAC,CAAA;AACrC,mBAA2B,SAAS,CAAC,CAAA;AAKrC;IAII,0BAAoB,IAAU;QAAV,SAAI,GAAJ,IAAI,CAAM;QAF9B,QAAG,GAAW,gBAAgB,CAAC;IAEG,CAAC;IAEnC,uCAAY,GAAZ;QACI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC;aACzB,GAAG,CAAC,UAAC,IAAc,IAAK,OAAA,IAAI,CAAC,IAAI,EAAE,EAAX,CAAW,CAAC;aACpC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACjC,CAAC;IAED,kDAAuB,GAAvB;QACI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC;aACzB,SAAS,EAAE;aACX,IAAI,CAAC,UAAC,IAAc,IAAK,OAAA,IAAI,CAAC,IAAI,EAAE,EAAX,CAAW,CAAC;aACrC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACjC,CAAC;IAED,sCAAW,GAAX,UAAY,EAAU;QAClB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAI,IAAI,CAAC,GAAG,SAAI,EAAI,CAAC;aACpC,GAAG,CAAC,UAAC,IAAc,IAAK,OAAA,IAAI,CAAC,IAAI,EAAE,EAAX,CAAW,CAAC;aACpC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACjC,CAAC;IAED,uCAAY,GAAZ,UAAa,QAAmB;QAC5B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC;aACpC,GAAG,CAAC,UAAC,IAAc,IAAK,OAAA,IAAI,CAAC,IAAI,EAAE,EAAX,CAAW,CAAC;aACpC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACjC,CAAC;IAED,sCAAW,GAAX,UAAY,QAAmB;QAC3B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAI,IAAI,CAAC,GAAG,SAAI,QAAQ,CAAC,EAAI,EAAE,QAAQ,CAAC;aACvD,GAAG,CAAC,UAAC,IAAc,IAAK,OAAA,IAAI,CAAC,IAAI,EAAE,EAAX,CAAW,CAAC;aACpC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACjC,CAAC;IAED,yCAAc,GAAd,UAAe,EAAU;QACrB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAI,IAAI,CAAC,GAAG,SAAI,EAAI,CAAC;aACvC,GAAG,CAAC,UAAC,IAAc,IAAK,OAAA,IAAI,EAAJ,CAAI,CAAC;aAC7B,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACjC,CAAC;IAGO,sCAAW,GAAnB,UAAoB,KAAU;QAC1B,IAAI,OAAO,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC,OAAO;YACzC,KAAK,CAAC,MAAM,GAAM,KAAK,CAAC,MAAM,WAAM,KAAK,CAAC,UAAY,GAAG,cAAc,CAAC;QAC5E,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACvB,MAAM,CAAC,eAAU,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACrC,CAAC;IAlDL;QAAC,iBAAU,EAAE;;wBAAA;IAoDb,uBAAC;AAAD,CAAC,AAnDD,IAmDC;AAnDY,wBAAgB,mBAmD5B,CAAA"} -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/wwwroot/app/shared/customers.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { Http, Response } from '@angular/http'; 3 | 4 | import 'rxjs/add/operator/map'; 5 | import 'rxjs/add/operator/catch'; 6 | import 'rxjs/add/operator/toPromise'; 7 | import { Observable } from 'rxjs/Rx'; 8 | 9 | import { ICustomer } from './interfaces'; 10 | 11 | @Injectable() 12 | export class CustomersService { 13 | 14 | url: string = '/api/customers'; 15 | 16 | constructor(private http: Http) { } 17 | 18 | getCustomers(): Observable { 19 | return this.http.get(this.url) 20 | .map((resp: Response) => resp.json()) 21 | .catch(this.handleError); 22 | } 23 | 24 | getCustomersWithPromise(): Promise { 25 | return this.http.get(this.url) 26 | .toPromise() 27 | .then((resp: Response) => resp.json()) 28 | .catch(this.handleError); 29 | } 30 | 31 | getCustomer(id: number) : Observable { 32 | return this.http.get(`${this.url}/${id}`) 33 | .map((resp: Response) => resp.json()) 34 | .catch(this.handleError); 35 | } 36 | 37 | postCustomer(customer: ICustomer): Observable { 38 | return this.http.post(this.url, customer) 39 | .map((resp: Response) => resp.json()) 40 | .catch(this.handleError); 41 | } 42 | 43 | putCustomer(customer: ICustomer): Observable { 44 | return this.http.put(`${this.url}/${customer.id}`, customer) 45 | .map((resp: Response) => resp.json()) 46 | .catch(this.handleError); 47 | } 48 | 49 | deleteCustomer(id: number): Observable { 50 | return this.http.delete(`${this.url}/${id}`) 51 | .map((resp: Response) => resp) 52 | .catch(this.handleError); 53 | } 54 | 55 | 56 | private handleError(error: any) { 57 | let message = (error.message) ? error.message : 58 | error.status ? `${error.status} - ${error.statusText}` : 'Server error'; 59 | console.error(message); 60 | return Observable.throw(message); 61 | } 62 | 63 | } -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/wwwroot/app/shared/interfaces.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | //# sourceMappingURL=interfaces.js.map -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/wwwroot/app/shared/interfaces.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["interfaces.ts"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/wwwroot/app/shared/interfaces.ts: -------------------------------------------------------------------------------- 1 | export interface ICustomer { 2 | id?: number; 3 | firstName: string; 4 | lastName: string; 5 | address: IAddress; 6 | } 7 | 8 | export interface IAddress { 9 | id: number; 10 | city: string; 11 | state: string; 12 | zip: number; 13 | } -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/wwwroot/images/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DanWahlin/CoreWebAPIAndAngular/77bf8854e5b8c4fb72af62764c385d4ac3192624/src/CoreWebAPIAndAngular/wwwroot/images/.gitkeep -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/wwwroot/styles/styles.css: -------------------------------------------------------------------------------- 1 | html { 2 | overflow-y: scroll; 3 | overflow-x: hidden; 4 | } 5 | 6 | main { 7 | position: relative; 8 | padding-top: 60px; 9 | } 10 | 11 | /* Ensure display:flex and others don't override a [hidden] */ 12 | [hidden] { display: none !important; } 13 | 14 | .navbar-inner { 15 | padding-left: 0px; 16 | -webkit-border-radius: 0px; 17 | border-radius: 0px; 18 | -webkit-box-shadow: none; 19 | -moz-box-shadow: none; 20 | box-shadow: none; 21 | background-color: #027FF4; 22 | background-image: none; 23 | } 24 | 25 | .navbar-inner.toolbar { 26 | background-color: #fafafa; 27 | } 28 | 29 | footer { 30 | margin-top: 15px; 31 | } 32 | 33 | .btn { 34 | margin-right:15px; 35 | width:200px; 36 | } 37 | 38 | .navbar-inner.footer { 39 | background-color: #fafafa; 40 | -webkit-box-shadow: none; 41 | -moz-box-shadow: none; 42 | box-shadow: none; 43 | height:50px; 44 | } 45 | 46 | .nav.navBarPadding { 47 | margin-left:25px; 48 | margin-top: 10px; 49 | } 50 | 51 | .navbar .brand { 52 | margin-top: 2px; 53 | color: #fff; 54 | -webkit-text-shadow: none; 55 | text-shadow: none; 56 | } 57 | 58 | .navbar-toggle { 59 | border: 1px solid white; 60 | } 61 | 62 | .navbar-toggle .icon-bar { 63 | background-color: white; 64 | } 65 | 66 | .app-title { 67 | line-height:50px; 68 | font-size:20px; 69 | color: white; 70 | } -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/wwwroot/systemjs.config.js: -------------------------------------------------------------------------------- 1 | (function(global) { 2 | 3 | // map tells the System loader where to look for things 4 | var map = { 5 | 'app': 'app', // 'dist', 6 | '@angular': 'node_modules/@angular', 7 | 'rxjs': 'node_modules/rxjs' 8 | }; 9 | 10 | // packages tells the System loader how to load when no filename and/or no extension 11 | var packages = { 12 | 'app': { main: 'main.js', defaultExtension: 'js' }, 13 | 'rxjs': { defaultExtension: 'js' } 14 | }; 15 | 16 | var ngPackageNames = [ 17 | 'common', 18 | 'compiler', 19 | 'core', 20 | 'forms', 21 | 'http', 22 | 'platform-browser', 23 | 'platform-browser-dynamic', 24 | 'router', 25 | 'upgrade', 26 | ]; 27 | 28 | // Individual files (~300 requests): 29 | function packIndex(pkgName) { 30 | packages['@angular/'+pkgName] = { main: 'index.js', defaultExtension: 'js' }; 31 | } 32 | 33 | // Bundled (~40 requests): 34 | function packUmd(pkgName) { 35 | packages['@angular/'+pkgName] = { main: '/bundles/' + pkgName + '.umd.js', defaultExtension: 'js' }; 36 | } 37 | 38 | // Most environments should use UMD; some (Karma) need the individual index files 39 | var setPackageConfig = System.packageWithIndex ? packIndex : packUmd; 40 | // Add package entries for angular packages 41 | ngPackageNames.forEach(setPackageConfig); 42 | 43 | var config = { 44 | map: map, 45 | packages: packages 46 | }; 47 | 48 | System.config(config); 49 | 50 | })(this); -------------------------------------------------------------------------------- /src/CoreWebAPIAndAngular/wwwroot/typings.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | declare var module: {id: string}; --------------------------------------------------------------------------------