Skip to content

Commit 0331f78

Browse files
committed
Add the find links
1 parent e8a5f27 commit 0331f78

File tree

7 files changed

+51
-3
lines changed

7 files changed

+51
-3
lines changed

codebase/src/compiler/checker-inference.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Type Inference
1+
2+
[0]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/compiler/checker.ts#L21772# Type Inference
23

34
TypeScript has a number of related techniques which together are
45
called type inference: places where a type is discovered from

codebase/src/compiler/checker.md

+23
Original file line numberDiff line numberDiff line change
@@ -176,30 +176,53 @@ TODO: what are substituted types?
176176
[`createFileDiagnostic`][10] which should get called for all diagnostic errors.
177177

178178
<!-- prettier-ignore-start -->
179+
[0]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/compiler/program.ts#L1926
179180
[0]: <src/compiler/program.ts - function getDiagnosticsProducingTypeChecker>
181+
[1]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/compiler/checker.ts#L40626
180182
[1]: <src/compiler/checker.ts - function getDiagnosticsWorker>
183+
[2]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/compiler/checker.ts#L40546
181184
[2]: <src/compiler/checker.ts - function checkSourceFileWorker>
185+
[3]: https://github.com/microsoft/TypeScript/blob/db9e0079//src/compiler/types.ts#L5091
182186
[3]: </src/compiler/types.ts - export interface NodeLinks>
183187
[4]: GLOSSARY.md#statements
184188
[ast]: GLOSSARY.md#statements
189+
[5]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/compiler/checker.ts#L40194
185190
[5]: <src/compiler/checker.ts - function checkSourceElementWorker>
191+
[6]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/compiler/checker.ts#L38138
186192
[6]: <src/compiler/checker.ts - function checkReturnStatement>
193+
[7]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/compiler/checker.ts
187194
[7]: <src/compiler/checker.ts - export function getContainingFunction>
195+
[8]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/compiler/utilities.ts
188196
[8]: <src/compiler/utilities.ts - export function isFunctionLikeKind>
197+
[9]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/compiler/checker.ts#L43738
189198
[9]: <src/compiler/checker.ts - function grammarErrorOnFirstToken>
199+
[10]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/compiler/utilities.ts#L5960
190200
[10]: <src/compiler/utilities.ts - export function createFileDiagnostic(file: SourceFile, start: number, length: number, message: DiagnosticMessage): DiagnosticWithLocation>
201+
[11]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/compiler/checker.ts#L37216
191202
[11]: <src/compiler/checker.ts - function checkTruthinessExpression>
203+
[12]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/compiler/checker.ts#L17221
192204
[12]: <src/compiler/checker.ts - function checkExpression>
205+
[13]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/compiler/checker.ts#L37076
193206
[13]: <src/compiler/checker.ts - function checkIfStatement>
207+
[14]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/compiler/checker.ts#L33081
194208
[14]: <src/compiler/checker.ts - function checkBinaryLikeExpression>
209+
[15]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/compiler/checker.ts#L17842
195210
[15]: <src/compiler/checker.ts - function isTypeRelatedTo>
211+
[16]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/compiler/checker.ts#L17805
196212
[16]: <src/compiler/checker.ts - function isSimpleTypeRelatedTo>
213+
[17]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/compiler/checker.ts#L17063
197214
[17]: <src/compiler/checker.ts - function checkTypeRelatedTo>
215+
[17]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/compiler/checker.ts#L18240
198216
[17]: <src/compiler/checker.ts - function isRelatedTo>
217+
[19]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/compiler/types.ts#L5120
199218
[19]: <src/compiler/types.ts - export const enum TypeFlags>
200219
[20]: GLOSSARY.md#structural-type-system
220+
[21]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/compiler/checker.ts#L18479
201221
[21]: <src/compiler/checker.ts - function isIdenticalTo>
222+
[22]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/compiler/checker.ts#L18758
202223
[22]: <src/compiler/checker.ts - function recursiveTypeRelatedTo>
224+
[22]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/compiler/checker.ts#L18589
203225
[22]: <src/compiler/checker.ts - function eachTypeRelatedToSomeType>
226+
[23]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/compiler/checker.ts#L18872
204227
[23]: <src/compiler/checker.ts - function structuredTypeRelatedTo>
205228
<!-- prettier-ignore-end -->

codebase/src/compiler/emitter.md

+5
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,14 @@ Emitting a declaration file is a multi-step process. It goes through the above e
3939
goes through a
4040

4141
<!-- prettier-ignore-start -->
42+
[0]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/compiler/emitter.ts#L1041
4243
[0]: <src/compiler/emitter.ts - function writeBundle>
44+
[1]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/compiler/emitter.ts#L852
4345
[1]: <src/compiler/emitter.ts - function createPrinter>
46+
[2]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/compiler/emitter.ts#L1129
4447
[2]: <src/compiler/emitter.ts - function print(>
48+
[3]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/compiler/emitter.ts#L844
4549
[3]: <src/compiler/emitter.ts - const enum PipelinePhase>
50+
[3]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/compiler/emitter.ts#L1270
4651
[3]: <src/compiler/emitter.ts - function pipelineEmitWithHint(>
4752
<!-- prettier-ignore-end -->

codebase/src/compiler/parser.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Parser
1+
2+
[0]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/compiler/program.ts#L1926# Parser
23

34
At a measly 8k lines long, the Parser is responsible for controlling a scanner (or two) and turning the output
45
tokens from the scanner into an AST as the canonical representation of the source file.

codebase/src/compiler/scanner.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,20 @@ doesn't do that.
8080

8181
<!-- prettier-ignore-start -->
8282
[0]: ./parser.md
83-
[1]: http://abc.com
83+
[1]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/compiler/scanner.ts#L929
8484
[1]: <src/compiler/scanner.ts - export function createScanner>
85+
[2]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/compiler/scanner.ts#L2551
8586
[2]: <src/compiler/scanner.ts - function setText(>
8687
[3]: GLOSSARY.md#incremental-parsing
88+
[4]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/compiler/scanner.ts#L1609
8789
[4]: <src/compiler/scanner.ts - function scan(>
90+
[5]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/compiler/scanner.ts#L1681
8891
[5]: <src/compiler/scanner.ts - case CharacterCodes.exclamation>
8992
[6]: ./formatter.md
93+
[7]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/services/classifier.ts#L3
9094
[7]: <src/services/classifier.ts - function createClassifier>
95+
[8]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/compiler/types.ts#L709
9196
[8]: <src/compiler/types.ts - type JsxTokenSyntaxKind>
97+
[9]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/compiler/types.ts#L2159
9298
[9]: <src/compiler/types.ts - export const enum TokenFlags>
9399
<!-- prettier-ignore-end -->

codebase/src/services/completions.md

+2
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ different uses:
105105
####
106106

107107
<!-- prettier-ignore-start -->
108+
[1]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/services/completions.ts#L1525
108109
[1]: <src/services/completions.ts - interface CompletionData {>
110+
[2]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/services/completions.ts#L1618
109111
[2]: <src/services/completions.ts - function getCompletionData(>
110112
<!-- prettier-ignore-end -->

codebase/src/services/textChanges.md

+10
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,24 @@ Changes look like this:
5454
[`newFileChanges`][3] handles passing the set of
5555

5656
<!-- prettier-ignore-start -->
57+
[0]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/services/textChanges.ts#L303
5758
[0]: <src/services/textChanges.ts - export class ChangeTracker>
59+
[1]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/services/textChanges.ts#L136
5860
[1]: <src/services/textChanges.ts - type Change =>
61+
[2]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/services/textChanges.ts#L1134
5962
[2]: <src/services/textChanges.ts - function createWriter>
63+
[3]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/services/textChanges.ts#L1022
6064
[3]: <src/services/textChanges.ts - function newFileChanges>
65+
[4]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/services/textChanges.ts#L994
6166
[4]: <src/services/textChanges.ts - function getTextChangesFromChanges>
67+
[5]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/services/textChanges.ts#L1035
6268
[5]: <src/services/textChanges.ts - function computeNewText>
69+
[6]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/services/textChanges.ts#L1065
6370
[6]: <src/services/textChanges.ts - function getFormattedTextOfNode>
71+
[7]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/compiler/emitter.ts#L852
6472
[7]: <src/compiler/emitter.ts - function createPrinter>
73+
[8]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/services/textChanges.ts#L1088
6574
[8]: <src/services/textChanges.ts - function getNonformattedText>
75+
[8]: https://github.com/microsoft/TypeScript/blob/db9e0079/src/services/textChanges.ts#L1101
6676
[8]: <src/services/textChanges.ts - function applyChanges>
6777
<!-- prettier-ignore-end -->

0 commit comments

Comments
 (0)