Git Product home page Git Product logo

w-hanyu / fe-js-ts Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 32.73 MB

🔥🔥🔥随着前端技术越来越成熟,JS/TS已成为各大厂开发的必备使用语言,本站从易到难深入理解JS/TS,同时提供TS做题功能,让你边学边实践,快速掌握🔥🔥🔥

JavaScript 18.19% Vue 32.28% TypeScript 35.59% CSS 12.12% Shell 1.82%
javascript javascript-library typescript typescript-library

fe-js-ts's Introduction

Hi there 👋

This is Ustinian!

Github Gmail

Welcome to my Github page! I am Ustinian and I am a FE engineer and currently studying at the university of HUST!

img

Talking about Personal Stuffs:

  • 👨🏽‍💻 I am currently studying at Huazhong University of Science and Technology;
  • 🌱 I am currently a front-end engineer;
  • 🤔 I’m currently learning nestjs、redis and mysql;
  • 💬 Ask me about anything, I am happy to discuss;
  • 📫 How to reach me: [email protected];

💻 Programming languages and tools:

HTML5 CSS3 JavaScript Node.js React Vue.js

fe-js-ts's People

Contributors

w-hanyu avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

fe-js-ts's Issues

1-11实现-includes.md

//你的答案
type Includes<T extends readonly any[], U> = {
  [K in keyof T]: Equal<U, T[K]>;
}[number] extends false
  ? false
  : true;

1.2.实现Pick

//你的答案
type MyPick<T, K extends keyof T> = {
  [P in K]: T[P];
};

1-12实现-parameters.md

//你的答案
type MyParameters<T extends (...args: any[]) => any> = T extends (
  ...args: infer P
) => any
  ? P
  : never;

1-10实现-if.md

//你的答案
type If<C extends boolean, T, F> = C extends true ? T : F;

1-8实现-concat.md

//你的答案
type Concat<T extends unknown[], U extends unknown[]> = [...T, ...U];

1.3.实现Awaited

//你的答案
type MyAwaited<T> = T extends Promise<infer U> ? Awaited<U> : T;

1-5-实现Tuple to Object

//你的答案
我们需要从数组中获取所有的值,并将其作为新对象中的键和值。

这个使用索引类型很容易。我们可以通过使用 T[number]从数组中获取值。在映射类型的 帮助下,我们可以迭代 T[number]中的这些值,并返回一个新的类型,其中键和值  T[number]的类型:

type TupleToObject<T extends readonly string[]> = { [K in T[number]]: K };

2-2实现-omit.md

//你的答案
type MyOmit<T, K extends keyof T> = {
  [P in Exclude<keyof T, K>]: T[P];
};

1-12实现-parameters.md

//你的答案
type MyParameters<T extends (...args: any[]) => any> = T extends (
  ...args: infer P
) => any
  ? P
  : never;

1-11实现-includes.md

//你的答案
type Includes<T extends readonly any[], U> = T extends [infer R, ...infer K]
  ? Equal<U, R> extends true
    ? true
    : Includes<K, U>
  : false;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.