Skip to content

Commit 7942ed1

Browse files
Added enums
1 parent 0fab7c7 commit 7942ed1

File tree

19 files changed

+855
-78
lines changed

19 files changed

+855
-78
lines changed

.vscode/settings.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
{
22
"[csharp]": {
3-
"editor.formatOnSave": false,
4-
"editor.defaultFormatter": "csharpier.csharpier-vscode"
3+
"editor.formatOnSave": true,
4+
"editor.defaultFormatter": "ms-dotnettools.csharp"
5+
},
6+
"[typescript]": {
7+
"editor.formatOnSave": true,
8+
"editor.defaultFormatter": "esbenp.prettier-vscode"
59
},
610
"better-comments.tags": [
711
{

docs/.vitepress/config.mts

Lines changed: 144 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,122 +1,194 @@
1-
import { defineConfig } from 'vitepress'
1+
import { defineConfig } from "vitepress";
22

33
// https://vitepress.dev/reference/site-config
44
export default defineConfig({
55
title: "TypeScript is Like C#",
6-
description: "A guide for backend devs. If you already know TypeScript, then learning C# is easy! This guide walks you through the similarities (and differences) between TypeScript and C#",
6+
description:
7+
"A guide for backend devs. If you already know TypeScript, then learning C# is easy! This guide walks you through the similarities (and differences) between TypeScript and C#",
78
sitemap: {
8-
hostname: 'https://typescript-is-like-csharp.chrlschn.dev'
9+
hostname: "https://typescript-is-like-csharp.chrlschn.dev",
910
},
1011
head: [
11-
['link', { rel: 'icon', href: '/csharp-logo-32.png' }],
12-
['meta', { property: 'og:image', content: 'https://typescript-is-like-csharp.chrlschn.dev/typescript-csharp.png' }],
13-
['meta', { property: 'twitter:image', content: 'https://typescript-is-like-csharp.chrlschn.dev/typescript-csharp.png' }],
14-
['script', {
15-
async: '',
16-
src: 'https://www.googletagmanager.com/gtag/js?id=G-QLSJ4QC7YZ'
17-
}],
18-
['script', {}, `
12+
["link", { rel: "icon", href: "/csharp-logo-32.png" }],
13+
[
14+
"meta",
15+
{
16+
property: "og:image",
17+
content:
18+
"https://typescript-is-like-csharp.chrlschn.dev/typescript-csharp.png",
19+
},
20+
],
21+
[
22+
"meta",
23+
{
24+
property: "twitter:image",
25+
content:
26+
"https://typescript-is-like-csharp.chrlschn.dev/typescript-csharp.png",
27+
},
28+
],
29+
[
30+
"script",
31+
{
32+
async: "",
33+
src: "https://www.googletagmanager.com/gtag/js?id=G-QLSJ4QC7YZ",
34+
},
35+
],
36+
[
37+
"script",
38+
{},
39+
`
1940
window.dataLayer = window.dataLayer || [];
2041
function gtag(){dataLayer.push(arguments);}
2142
gtag('js', new Date());
2243
gtag('config', 'G-QLSJ4QC7YZ');
23-
`],
44+
`,
45+
],
2446
],
2547
themeConfig: {
2648
// https://vitepress.dev/reference/default-theme-config
27-
logo: '/csharp-logo.png',
49+
logo: "/csharp-logo.png",
2850

2951
nav: [
30-
{ text: 'Home', link: '/' },
31-
{ text: 'Intro', link: '/pages/intro-and-motivation' },
32-
{ text: 'About', link: 'https://www.linkedin.com/in/charlescchen/' },
52+
{ text: "Home", link: "/" },
53+
{ text: "Intro", link: "/pages/intro-and-motivation" },
54+
{ text: "About", link: "https://www.linkedin.com/in/charlescchen/" },
3355
],
3456

3557
editLink: {
36-
pattern: 'https://github.com/CharlieDigital/typescript-is-like-csharp/blob/main/docs/:path'
58+
pattern:
59+
"https://github.com/CharlieDigital/typescript-is-like-csharp/blob/main/docs/:path",
3760
},
3861

3962
sidebar: [
4063
{
41-
text: 'Guide',
64+
text: "Guide",
4265
items: [
43-
{ text: 'Intro and Motivation', link: '/pages/intro-and-motivation' },
44-
{ text: 'Getting Started', link: '/pages/getting-started' },
66+
{ text: "Intro and Motivation", link: "/pages/intro-and-motivation" },
67+
{ text: "Getting Started", link: "/pages/getting-started" },
4568
{
46-
text: 'Basics',
69+
text: "Basics",
4770
collapsed: true,
4871
items: [
49-
{ text: 'Variables', link: '/pages/basics/variables' },
50-
{ text: 'Types', link: '/pages/basics/types' },
51-
{ text: 'Nulls', link: '/pages/basics/nulls' },
52-
{ text: 'Strings', link: '/pages/basics/strings' },
53-
{ text: 'Collections', link: '/pages/basics/collections' },
54-
{ text: 'Error Handling', link: '/pages/basics/error-handling' },
55-
{ text: 'Conditionals', link: '/pages/basics/conditionals' },
56-
{ text: 'Iteration', link: '/pages/basics/iteration' },
57-
{ text: 'Comments', link: '/pages/basics/comments' },
58-
{ text: 'Functions', link: '/pages/basics/functions' },
59-
{ text: 'Classes and Types', link: '/pages/basics/classes' },
60-
{ text: 'Generics', link: '/pages/basics/generics' },
61-
{ text: 'Async/Await', link: '/pages/basics/async-await' },
62-
{ text: 'Packages vs Projects', link: '/pages/basics/projects' },
63-
{ text: 'import vs using', link: '/pages/basics/import-vs-using' },
64-
{ text: 'CLI and Tooling', link: '/pages/basics/cli-tooling' },
65-
]
72+
{ text: "Variables", link: "/pages/basics/variables" },
73+
{ text: "Types", link: "/pages/basics/types" },
74+
{ text: "Nulls", link: "/pages/basics/nulls" },
75+
{ text: "Strings", link: "/pages/basics/strings" },
76+
{ text: "Enums", link: "/pages/basics/enums" },
77+
{ text: "Collections", link: "/pages/basics/collections" },
78+
{ text: "Error Handling", link: "/pages/basics/error-handling" },
79+
{ text: "Conditionals", link: "/pages/basics/conditionals" },
80+
{ text: "Iteration", link: "/pages/basics/iteration" },
81+
{ text: "Comments", link: "/pages/basics/comments" },
82+
{ text: "Functions", link: "/pages/basics/functions" },
83+
{ text: "Classes and Types", link: "/pages/basics/classes" },
84+
{ text: "Generics", link: "/pages/basics/generics" },
85+
{ text: "Async/Await", link: "/pages/basics/async-await" },
86+
{ text: "Packages vs Projects", link: "/pages/basics/projects" },
87+
{
88+
text: "import vs using",
89+
link: "/pages/basics/import-vs-using",
90+
},
91+
{ text: "CLI and Tooling", link: "/pages/basics/cli-tooling" },
92+
],
6693
},
6794
{
68-
text: 'Intermediate',
95+
text: "Intermediate",
6996
collapsed: true,
7097
items: [
71-
{ text: 'LINQ', link: '/pages/intermediate/linq' },
72-
{ text: 'Tuples', link: '/pages/intermediate/tuples' },
98+
{ text: "LINQ", link: "/pages/intermediate/linq" },
99+
{ text: "Tuples", link: "/pages/intermediate/tuples" },
73100
// { text: 'Records', link: '/pages/intermediate/records' },
74-
{ text: 'Extension Methods', link: '/pages/intermediate/extension-methods' },
75-
{ text: 'Iterators and Enumerables', link: '/pages/intermediate/iterators-enumerables' },
76-
{ text: '🚧 Unit Testing', link: '/pages/intermediate/unit-testing' },
77-
{ text: 'Express vs Minimal API', link: '/pages/intermediate/express-vs-minimal-api' },
78-
{ text: 'Nest.js vs Controller API', link: '/pages/intermediate/nest-vs-controller-api' },
79-
{ text: 'Decorators vs Attributes', link: '/pages/intermediate/decorators-vs-attributes' },
101+
{
102+
text: "Extension Methods",
103+
link: "/pages/intermediate/extension-methods",
104+
},
105+
{
106+
text: "Iterators and Enumerables",
107+
link: "/pages/intermediate/iterators-enumerables",
108+
},
109+
{
110+
text: "🚧 Unit Testing",
111+
link: "/pages/intermediate/unit-testing",
112+
},
113+
{
114+
text: "Express vs Minimal API",
115+
link: "/pages/intermediate/express-vs-minimal-api",
116+
},
117+
{
118+
text: "Nest.js vs Controller API",
119+
link: "/pages/intermediate/nest-vs-controller-api",
120+
},
121+
{
122+
text: "Decorators vs Attributes",
123+
link: "/pages/intermediate/decorators-vs-attributes",
124+
},
80125
// { text: 'Dependency Injection', link: '/pages/intermediate/dependency-injection' },
81-
{ text: 'Databases and ORMs', link: '/pages/intermediate/databases-and-orms' },
82-
]
126+
{
127+
text: "Databases and ORMs",
128+
link: "/pages/intermediate/databases-and-orms",
129+
},
130+
],
83131
},
84132
{
85-
text: 'Advanced',
133+
text: "Advanced",
86134
collapsed: true,
87135
items: [
88-
{ text: 'Generators and Yield', link: '/pages/advanced/generators-yield' },
136+
{
137+
text: "Generators and Yield",
138+
link: "/pages/advanced/generators-yield",
139+
},
89140
// { text: 'dynamic (ExpandoObject)', link: '/pages/advanced/dynamic' },
90-
{ text: 'JSON Serialization', link: '/pages/advanced/json-serialization' },
91-
{ text: '🚧 Reflection', link: '/pages/advanced/reflection' },
92-
{ text: '🚧 Channels', link: '/pages/advanced/channels' },
93-
{ text: '🚧 Source Generation (Roslyn)', link: '/pages/advanced/source-generation-roslyn' },
94-
]
141+
{
142+
text: "JSON Serialization",
143+
link: "/pages/advanced/json-serialization",
144+
},
145+
{ text: "🚧 Reflection", link: "/pages/advanced/reflection" },
146+
{ text: "🚧 Channels", link: "/pages/advanced/channels" },
147+
{
148+
text: "🚧 Source Generation (Roslyn)",
149+
link: "/pages/advanced/source-generation-roslyn",
150+
},
151+
],
95152
},
96153
{
97-
text: 'Ergonomics',
154+
text: "Ergonomics",
98155
collapsed: true,
99156
items: [
100-
{ text: 'Switch Expression', link: '/pages/bonus/switch-expression' },
101-
{ text: 'Partial Classes', link: '/pages/bonus/partial-classes' },
102-
{ text: '🚧 Global Using', link: '/pages/bonus/global-usings' }
103-
]
157+
{
158+
text: "Switch Expression",
159+
link: "/pages/bonus/switch-expression",
160+
},
161+
{ text: "Partial Classes", link: "/pages/bonus/partial-classes" },
162+
{ text: "🚧 Global Using", link: "/pages/bonus/global-usings" },
163+
],
104164
},
105165
{
106-
text: 'How Do I...',
166+
text: "How Do I...",
107167
collapsed: true,
108168
items: [
109-
{ text: '🚧 Set up Formatters?', link: '/pages/how-to/code-formatting' },
110-
{ text: '🚧 Interface with the Backend?', link: '/pages/how-to/openapi-bindings' },
111-
{ text: '🚧 Build for Other Platforms?', link: '/pages/how-to/cross-platform-build' }
112-
]
169+
{
170+
text: "Set up Formatters?",
171+
link: "/pages/how-to/code-formatting",
172+
},
173+
{
174+
text: "🚧 Interface with the Backend?",
175+
link: "/pages/how-to/openapi-bindings",
176+
},
177+
{
178+
text: "🚧 Build for Other Platforms?",
179+
link: "/pages/how-to/cross-platform-build",
180+
},
181+
],
113182
},
114-
]
115-
}
183+
],
184+
},
116185
],
117186

118187
socialLinks: [
119-
{ icon: 'github', link: 'https://github.com/CharlieDigital/typescript-is-like-csharp' }
120-
]
121-
}
122-
})
188+
{
189+
icon: "github",
190+
link: "https://github.com/CharlieDigital/typescript-is-like-csharp",
191+
},
192+
],
193+
},
194+
});

0 commit comments

Comments
 (0)