Skip to content
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

Snapshot method #150

Merged
merged 2 commits into from
Jun 22, 2021
Merged

Snapshot method #150

merged 2 commits into from
Jun 22, 2021

Conversation

igorkamyshev
Copy link
Member

@igorkamyshev igorkamyshev commented Jun 13, 2021

Description

Hello. I create the same operator in Aviasales codebase and after that I found discussion about it #96 in this repo. So I decided to move implementation here.

Checklist for a new method

  • Create directory for new method in root in param-case
  • Place code to {method-name}/index.js in CommonJS export in camelCase named export
  • Add types to {method-name}/index.d.ts
  • Add tests to {method-name}/{method-name}.test.ts
  • Add fork tests to {method-name}/{method-name}.fork.test.ts
  • Add type tests to test-typings/{method-name}.ts
    • Use // @ts-expect-error to mark expected type error
    • import { expectType } from 'tsd' to check expected return type
  • Add documentation in {method-name}/reade.md
    • Add header Patronum/MethodName
    • Add section with overloads, if have
    • Add Motivation, Formulae, Arguments and Return sections for each overload
    • Add useful examples in Example section for each overload
  • Add section to README.md in root
    • Add method to table of contents - [MethodName](#methodname)
    • Add section ## [MethodName](/method-name 'Documentation')
    • With summary and simple example

@igorkamyshev
Copy link
Member Author

igorkamyshev commented Jun 13, 2021

Also, I think types of this method are pretty simple, and I am not sure, should I write tests for it?

@sergeysova
Copy link
Member

@igorkamyshev I think it is better to add type tests

@igorkamyshev
Copy link
Member Author

igorkamyshev commented Jun 15, 2021

@igorkamyshev I think it is better to add type tests

Done.

Also, I've updated snapshots for tests. I didn't touch code of the functions, so I think it is just test-flapping. Maybe we can replace snapshot-testing by more stable technics?

@igorkamyshev
Copy link
Member Author

I found this PR had been approved. So, do you have plans of release it?

@igorkamyshev
Copy link
Member Author

@sergeysova sorry for interruption. It looks like ready for release. Could you please merge it? Or should I fix something?

@sergeysova sergeysova merged commit 2389fd5 into effector:main Jun 22, 2021
@sergeysova sergeysova added the feature New functionality label Jun 22, 2021
@sergeysova sergeysova added this to the v2.0 milestone Nov 14, 2021
@sergeysova sergeysova mentioned this pull request Nov 14, 2021
35 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants