Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: gltumakov/ts-guideline
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: georgolden/ts-guideline
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 3 commits
  • 3 files changed
  • 2 contributors

Commits on Jan 6, 2023

  1. Fix d.ts import issue

    georgolden committed Jan 6, 2023
    Copy the full SHA
    96c518c View commit details
  2. Fix link to a video

    georgolden committed Jan 6, 2023
    Copy the full SHA
    3b26b59 View commit details

Commits on Jan 10, 2023

  1. Fix grammar mistakes in readme

    d4rl1nn authored and georgolden committed Jan 10, 2023
    Copy the full SHA
    6013aba View commit details
Showing with 11 additions and 8 deletions.
  1. +8 −4 README.md
  2. +1 −2 js-dts/src/{sum.d.ts → isum.d.ts}
  3. +2 −2 js-dts/src/sum.js
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -8,10 +8,12 @@ Minimalistic configuration for TS to only extend JS with types. No TS-scpecific

- **ecmascript** folder for ECMAScript Modules ts-configuration

- **js-dts** folder for JS + DTS configuration
- **js-dts** folder for JS + DTS configuration.

- **js-doc** folder for JS Doc + TypeScript configuration

**Important**: use different file names `sum.js` - `isum.d.ts` to not create import conflicts

</font>

# Reccomendations
@@ -45,7 +47,7 @@ Minimalistic configuration for TS to only extend JS with types. No TS-scpecific
> &
THelpers;
```
basically is is looks worse then
basically it looks worse then
```ts
type QueryWithHelpers<any> = Query<any> & any;
```
@@ -100,10 +102,12 @@ This list will continue in future.

I prefer to use JS + DTS or JS DOC + TypeScript, because it solve every type issues, but not requires to write code in TypeScript

If it is not possible for you to follow this 2 solutions, please think about using those TS Guidelines. It will save you a lot of pain in future.
If it is not possible for you to follow this 2 solutions, please think about using those TS Guidelines. It will reduce your pain in the future.

TypeScript will sync their development within the JavaScript standard. This means there will be no TS Decorators and TypeScript will become more like JS Extension rather than a different language transpiled to JS.

</font>

[![Good talks about Types and JS/TS future](https://img.youtube.com/vi/SdV9Xy0E4CM/0.jpg)](https://www.youtube.com/watch?v=SdV9Xy0E4CM)
**Talk about Types and JS/TS future:**

[![Talk about Types and JS/TS future](https://img.youtube.com/vi/SdV9Xy0E4CM/0.jpg)](https://www.youtube.com/watch?v=SdV9Xy0E4CM)
3 changes: 1 addition & 2 deletions js-dts/src/sum.d.ts → js-dts/src/isum.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
export function sum(a: number, b: number): number;

export class Summator {
export interface ISummator {
args: number[];
constructor(...args: number[]);
summary(): number;
}
4 changes: 2 additions & 2 deletions js-dts/src/sum.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @typedef {import('./sum').sum} sum;
* @typedef {import('./sum').Summator} ISummator;
* @typedef {import('./isum').sum} sum;
* @typedef {import('./isum').ISummator} ISummator;
*/

/** @type {sum} */