-
Notifications
You must be signed in to change notification settings - Fork 0
📝 docs(arc 35): methods documentation #30
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
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Coverage Report for packages/repository
File CoverageNo changed files found. |
docs/complex-types/methods.md
Outdated
`Methods<TSchema>`: This is a generic type called `Methods`. It takes a type parameter `TSchema`, which is expected to extend the `EntitySchema`.<br/> | ||
This means that `Methods` is a reusable type where we can use it for different EntityType. (dunno if I should explain this @TODO) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Skup się najpierw na celu jaki realizuje dany typ - w tym przykładzie Methods
stanowią strukturę dla deklaracji metod w modelu Entity.
Dopiero w kolejnej sekcji jak ten typ jest zbudowany - ale skupiając się tylko na najtrudniejszych kawałkach.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wydaje się, że rozpykane to zostało 😄
06ca3c0
to
6d3dcba
Compare
6d3dcba
to
baaff3e
Compare
baaff3e
to
0c69f78
Compare
0c69f78
to
3744a9f
Compare
It's an `object` with two keys. | ||
|
||
```ts | ||
export type PrototypeMethods<TSchema extends EntitySchema> = { | ||
toObject(): TSchema | ||
toJson(): string | ||
} | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Zrobiłem update po refactorach
```ts | ||
export type Methods<TSchema extends EntitySchema> = Record< | ||
string, // keys | ||
(this: TSchema, ...args: any[]) => any // values |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To jescze trzeba zupdate-ować
The calculations will be always an union (Type is running mechanism twice for `Methods<TSchema>` & `undefined`) | ||
and result will contain `"true"` or `"false"` or `0` | ||
|
||
#### 3. Augmentation of Methods |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prostszym pojęciem jest merge i to bym poszedł niż w Augmentation. ;)
Generalnie dobra robota 👍 Zrobiłem Ci update do maina, bo trochę konfliktów było, mi było je prościej rozwiązać ;) |
Dodałem markdownlint w między czasie - więc dorzuć jeszcze poprawki i możemy zamykać ;) |
@coderabbitai zrób proszę analizę tego pull requesta. Sprawdź również czemu nie przeszedł pipeline CI |
@grixu: Analiza pull requesta wykazała, że konfiguracja CI ( Analysis chainScripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Find CI configuration files (e.g., GitHub Actions, GitLab CI, etc.)
fd '\.github/workflows|\.gitlab-ci\.yml$'
# List the most recent commits to see if any might have affected the CI pipeline
git log -n 5 --pretty=format:"%h - %s"
Length of output: 362 Script: #!/bin/bash
# Assuming there might be multiple CI configuration files, read the contents of all files in the .github/workflows directory
fd '\.github/workflows' --exec cat {}
Length of output: 41 Script: #!/bin/bash
# List CI configuration files in the .github/workflows directory
fd '.yml$' '.github/workflows'
# Assuming the list command works, the next step would be to read each file. However, this script will first ensure we can list the files correctly.
Length of output: 80 Script: #!/bin/bash
# Read the contents of the CI configuration file to understand the CI pipeline setup, especially regarding markdownlint
cat .github/workflows/ci.yml
Length of output: 1317 |
No description provided.