TypeScript helpers suggestion.
See original GitHub issueHello,
I have used feathers-vuex
with TypeScript in a project and I made a set of helpers that I think could be really useful to other developers, here you can see the source code and below is an example of usage:
import Vue from 'vue'
import { Component } from 'vue-property-decorator'
import { namespace, Action } from 'vuex-class'
import { ActionGet, ActionCreate, ActionPatch } from '../types/feathers'
import { Person } from '../types/models'
const PeopleAction = namespace('people', Action)
@Component
export default class CreateEditPeople extends Vue {
@PeopleAction('get') getPerson: ActionGet<Person>
@PeopleAction('create') createPerson: ActionCreate<Person>
@PeopleAction('patch') patchPerson: ActionPatch<Person>
// some extra here
}
TypeScript reads it really well and all suggestions and autocomplete helps a lot.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:11 (8 by maintainers)
Top Results From Across the Web
Documentation - TypeScript 4.6
TypeScript now provides suggestions for when parameter names don't match between your function and its JSDoc comment. Suggestion diagnostics being shown in ...
Read more >How to get suggestion in typescript with "type JustifyContent ...
This requires a trick: type JustifyContentProperty = 'center' | 'flex-start' | string & {}. With this change, any string is still assignable ...
Read more >TypeScript Programming with Visual Studio Code
Get the best out editing TypeScript with Visual Studio Code. ... It offers classes, modules, and interfaces to help you build robust components....
Read more >TypeScript | WebStorm Documentation - JetBrains
Auto import with suggestion from the TypeScript Language Service: no choices ... https://resources.jetbrains.com/help/img/idea/.
Read more >Dynamic Suggestion Inputs with React Native, Typescript and ...
In order to get the null context to work with typescript I found the following helper function useful. export const AutoCompleteContext = ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have some typings for feathers-vuex too, I’m planning on putting together a PR at some point, but for now here they are.
Updated 7/30/19
@rayfoss Thanks for the update. I have similar sentiment. If @nickmessing’s suggestions work without requiring modifying the repo, that’s the perfect solution, in my opinion.
I’ve added a link to this issue in the docs. I’m closing this issue, now. Thanks, guys.