Skip to content

[New features] Primitive types and struct type #5879

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 44 commits into from

Conversation

wangyanxing
Copy link

This PR is a part of a graduate project of San Francisco State University.

Project draft:

The growth of the Web has been explosive. As the most important component of the front-end technology stack, JavaScript is always playing a significant role. It’s easy, fast and extendable. However, JavaScript also has its drawbacks, for instance, no static type checking. TypeScript is a strict superset of JavaScript invented by Microsoft. It brings a complete static type checking mechanism and modern object-oriented syntax features.
This project extends the TypeScript compiler and provides more strict and specific primitive types and new Struct syntax. The main goal is to enhance type safety as well as generate more efficient code.

Author: Yanxing Wang, Jie Dong
Supervisor: Dr. Arno Puder

@mhegazy mhegazy closed this Dec 2, 2015
@@ -407,7 +407,7 @@ namespace ts {
// (ref: https://github.com/nodejs/node/pull/2649 and https://github.com/Microsoft/TypeScript/issues/4643)
return _fs.watch(
path,
{ persistent: true, recursive: !!recursive },
{ persisten: true, recursive: !!recursive },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a typo.

@wangyanxing
Copy link
Author

Hi guys, so glad that you are carefully reviewing this PR! Thanks!

We have our proposal in this post:
#875

Actually, sending PR is a part of our gradate research project. We know our implementation is indeed immature, and definitely not ready to submit. But all of us are very interested in studying TypeScript and its potential extensions. We will keep doing it isolated for sure.

@weswigham many many thanks to your inline comments. Really helpful for our future research.

@@ -1210,7 +1231,7 @@ interface ArrayBuffer {
interface ArrayBufferConstructor {
prototype: ArrayBuffer;
new (byteLength: number): ArrayBuffer;
isView(arg: any): arg is ArrayBufferView;
isView(arg: any): boolean;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a regression.

@weswigham
Copy link
Member

The online diff shows a bunch of missing test results that should be there.

@@ -79,7 +79,7 @@ tests/cases/compiler/promisePermutations3.ts(159,21): error TS2345: Argument of
Type '(value: number) => Promise<any>' is not assignable to type '(value: string) => any'.
Types of parameters 'value' and 'value' are incompatible.
Type 'number' is not assignable to type 'string'.
tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of type '{ <T>(x: T): IPromise<T>; <T>(x: T, y: T): Promise<T>; }' is not assignable to parameter of type '(value: (x: any) => any) => Promise<any>'.
tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of type '{ <T>(x: T): IPromise<T>; <T>(x: T, y: T): Promise<T>; }' is not assignable to parameter of type '(value: {}) => Promise<any>'.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change seems.... wrong. I don't see anything which would intentionally prompt the change.

@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants