Skip to content
This repository has been archived by the owner on Feb 8, 2022. It is now read-only.

Commit

Permalink
updated to TypeScript 1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
ctaggart committed Nov 17, 2015
1 parent 2f253d8 commit d75136b
Show file tree
Hide file tree
Showing 6 changed files with 2,238 additions and 1,400 deletions.
8 changes: 8 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Autodetect text or binary. Do not leave merge conflict markers in the files.
* text=auto merge=union

# Use LF in the working directory by default. Override with core.autocrlf=true.
*.ts eol=lf

# Visual Studio can read LF sln files, but it always writes them as CRLF.
*.sln eol=crlf
168 changes: 84 additions & 84 deletions TsAst.njsproj
Original file line number Diff line number Diff line change
@@ -1,85 +1,85 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">11.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
<Name>TsAst</Name>
<RootNamespace>TsAst</RootNamespace>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>8f52bf62-d246-4039-8ca6-5cfd2aa63673</ProjectGuid>
<ProjectHome>.</ProjectHome>
<StartupFile>app.js</StartupFile>
<StartWebBrowser>False</StartWebBrowser>
<SearchPath>
</SearchPath>
<WorkingDirectory>.</WorkingDirectory>
<OutputPath>.</OutputPath>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<ProjectTypeGuids>{3AF33F2E-1136-4D97-BBB7-1795711AC8B8};{9092AA53-FB77-4645-B42D-1CCCA6BD08BD}</ProjectTypeGuids>
<ProjectView>ProjectFiles</ProjectView>
<TypeScriptSourceMap>true</TypeScriptSourceMap>
<TypeScriptModuleKind>CommonJS</TypeScriptModuleKind>
<EnableTypeScript>true</EnableTypeScript>
<StartWebBrowser>false</StartWebBrowser>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<ItemGroup>
<TypeScriptCompile Include="app.ts" />
<TypeScriptCompile Include="node.d.ts" />
<Content Include="package.json" />
<Content Include="README.md" />
</ItemGroup>
<ItemGroup>
<Folder Include="Scripts\" />
<Folder Include="Scripts\typings\" />
<Folder Include="Scripts\typings\node\" />
</ItemGroup>
<Import Project="$(VSToolsPath)\Node.js Tools\Microsoft.NodejsTools.targets" />
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<UseIIS>False</UseIIS>
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>0</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:48022/</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>True</UseCustomServer>
<CustomServerUrl>http://localhost:1337</CustomServerUrl>
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties>
</FlavorProperties>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}" User="">
<WebProjectProperties>
<StartPageUrl>
</StartPageUrl>
<StartAction>CurrentPage</StartAction>
<AspNetDebugging>True</AspNetDebugging>
<SilverlightDebugging>False</SilverlightDebugging>
<NativeDebugging>False</NativeDebugging>
<SQLDebugging>False</SQLDebugging>
<ExternalProgram>
</ExternalProgram>
<StartExternalURL>
</StartExternalURL>
<StartCmdLineArguments>
</StartCmdLineArguments>
<StartWorkingDirectory>
</StartWorkingDirectory>
<EnableENC>False</EnableENC>
<AlwaysStartWebServerOnDebug>False</AlwaysStartWebServerOnDebug>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">11.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
<Name>TsAst</Name>
<RootNamespace>TsAst</RootNamespace>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>8f52bf62-d246-4039-8ca6-5cfd2aa63673</ProjectGuid>
<ProjectHome>.</ProjectHome>
<StartupFile>app.js</StartupFile>
<StartWebBrowser>False</StartWebBrowser>
<SearchPath>
</SearchPath>
<WorkingDirectory>.</WorkingDirectory>
<OutputPath>.</OutputPath>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<ProjectTypeGuids>{3AF33F2E-1136-4D97-BBB7-1795711AC8B8};{9092AA53-FB77-4645-B42D-1CCCA6BD08BD}</ProjectTypeGuids>
<ProjectView>ProjectFiles</ProjectView>
<TypeScriptSourceMap>true</TypeScriptSourceMap>
<TypeScriptModuleKind>CommonJS</TypeScriptModuleKind>
<EnableTypeScript>true</EnableTypeScript>
<StartWebBrowser>false</StartWebBrowser>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<ItemGroup>
<TypeScriptCompile Include="app.ts" />
<TypeScriptCompile Include="node.d.ts" />
<Content Include="package.json" />
<Content Include="README.md" />
</ItemGroup>
<ItemGroup>
<Folder Include="Scripts\" />
<Folder Include="Scripts\typings\" />
<Folder Include="Scripts\typings\node\" />
</ItemGroup>
<Import Project="$(VSToolsPath)\Node.js Tools\Microsoft.NodejsTools.targets" />
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<UseIIS>False</UseIIS>
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>0</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:48022/</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>True</UseCustomServer>
<CustomServerUrl>http://localhost:1337</CustomServerUrl>
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties>
</FlavorProperties>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}" User="">
<WebProjectProperties>
<StartPageUrl>
</StartPageUrl>
<StartAction>CurrentPage</StartAction>
<AspNetDebugging>True</AspNetDebugging>
<SilverlightDebugging>False</SilverlightDebugging>
<NativeDebugging>False</NativeDebugging>
<SQLDebugging>False</SQLDebugging>
<ExternalProgram>
</ExternalProgram>
<StartExternalURL>
</StartExternalURL>
<StartCmdLineArguments>
</StartCmdLineArguments>
<StartWorkingDirectory>
</StartWorkingDirectory>
<EnableENC>False</EnableENC>
<AlwaysStartWebServerOnDebug>False</AlwaysStartWebServerOnDebug>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
</Project>
44 changes: 22 additions & 22 deletions TsAst.sln
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.30501.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9092AA53-FB77-4645-B42D-1CCCA6BD08BD}") = "TsAst", "TsAst.njsproj", "{8F52BF62-D246-4039-8CA6-5CFD2AA63673}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8F52BF62-D246-4039-8CA6-5CFD2AA63673}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8F52BF62-D246-4039-8CA6-5CFD2AA63673}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8F52BF62-D246-4039-8CA6-5CFD2AA63673}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8F52BF62-D246-4039-8CA6-5CFD2AA63673}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.30501.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9092AA53-FB77-4645-B42D-1CCCA6BD08BD}") = "TsAst", "TsAst.njsproj", "{8F52BF62-D246-4039-8CA6-5CFD2AA63673}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8F52BF62-D246-4039-8CA6-5CFD2AA63673}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8F52BF62-D246-4039-8CA6-5CFD2AA63673}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8F52BF62-D246-4039-8CA6-5CFD2AA63673}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8F52BF62-D246-4039-8CA6-5CFD2AA63673}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
66 changes: 33 additions & 33 deletions app.ts
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
///<reference path='../TypeScript/bin/typescript.d.ts' />
///<reference path='node.d.ts' />

import ts = require('typescript');
import fs = require('fs');
import path = require('path');

// derived from getAllBinaryExpressions https://github.com/Microsoft/TypeScript/issues/254
function getAllInterfaces(root: ts.Node) {
var result: ts.InterfaceDeclaration[] = [];
aggregate(root);
return result;

function aggregate(node: ts.Node): void {
if (node.kind === ts.SyntaxKind.InterfaceDeclaration) {
result.push(<ts.InterfaceDeclaration>node);
}
ts.forEachChild(node, aggregate);
}
}

export function main() {
var filename = process.cwd() + '/../TypeScript/bin/typescript.d.ts'
var source = String(fs.readFileSync(filename));

var sf = ts.createSourceFile(filename, source, ts.ScriptTarget.Latest);

getAllInterfaces(sf)
.map(ifd => ifd.name.text)
.sort()
.forEach(nm => console.log(nm));
}

///<reference path='node_modules/typescript/lib/typescript.d.ts' />
///<reference path='node.d.ts' />

import ts = require('typescript');
import fs = require('fs');
import path = require('path');

// derived from getAllBinaryExpressions https://github.com/Microsoft/TypeScript/issues/254
function getAllInterfaces(root: ts.Node) {
var result: ts.InterfaceDeclaration[] = [];
aggregate(root);
return result;

function aggregate(node: ts.Node): void {
if (node.kind === ts.SyntaxKind.InterfaceDeclaration) {
result.push(<ts.InterfaceDeclaration>node);
}
ts.forEachChild(node, aggregate);
}
}

export function main() {
var filename = process.cwd() + '/node_modules/typescript/lib/typescript.d.ts'
var source = String(fs.readFileSync(filename));

var sf = ts.createSourceFile(filename, source, ts.ScriptTarget.Latest);

getAllInterfaces(sf)
.map(ifd => ifd.name.text)
.sort()
.forEach(nm => console.log(nm));
}

main();
Loading

0 comments on commit d75136b

Please sign in to comment.