Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
CharlesTaylor7 committed Apr 18, 2024
1 parent dae6f74 commit ab4ef7d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
16 changes: 16 additions & 0 deletions checker/specification/staging.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
Currently implementing:

> This file is for work-in-progress and can help separating features that are being implemented to regressions
> https://github.com/microsoft/TypeScript/blob/main/src/lib/es5.d.ts#L1581-L1605
#### never type

```ts
function loops(): never {
while (true);
}

loops() satisfies string;

```

- expected string, found never

1 change: 1 addition & 0 deletions checker/src/synthesis/type_annotations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ pub(super) fn synthesise_type_annotation<T: crate::ReadFromFS>(
}
TypeAnnotation::Name(name, pos) => match name.as_str() {
"any" => TypeId::ANY_TYPE,
"never" => TypeId::NEVER_TYPE,
"this" => todo!(), // environment.get_value_of_this(&mut checking_data.types),
"self" => TypeId::ANY_INFERRED_FREE_THIS,
name => {
Expand Down

0 comments on commit ab4ef7d

Please sign in to comment.