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

omit ts bug - dont correct type automatically #18

Open
productdevbook opened this issue Aug 24, 2023 · 5 comments
Open

omit ts bug - dont correct type automatically #18

productdevbook opened this issue Aug 24, 2023 · 5 comments

Comments

@productdevbook
Copy link

productdevbook commented Aug 24, 2023

import { omit } from 'filter-anything'

const togglePropsa = {
  props: {
    modelValue: String,
  },
  emits: {
    'update:modelValue': (pressed: boolean) => String,
    'pressedChange': (pressed: boolean) => String,
    'click': (event: MouseEvent) => String,
  },
}
const test = omit(togglePropsa.emits, ['update:modelValue', 'pressedChange'])

image

ts dont omit see

@productdevbook productdevbook changed the title omit ts bug omit ts bug - dont correct type automatically Aug 24, 2023
@mesqueeb
Copy link
Owner

Your TS issues are not related to omit I believe. it says you cannot redeclare the variable test, so you already have a variable in that file called test.

@mesqueeb mesqueeb closed this as not planned Won't fix, can't repro, duplicate, stale Aug 25, 2023
@productdevbook
Copy link
Author

image

@productdevbook
Copy link
Author

this docs:
image
not same as docs, why i see 3 data in json i only need to see 1

@productdevbook
Copy link
Author

image

@mesqueeb mesqueeb reopened this Aug 25, 2023
@mesqueeb
Copy link
Owner

Interesting. It's a bug I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants