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

MongoQuery type causes error in Vue3 composable return type #608

Closed
NicoAiko opened this issue Mar 30, 2022 · 2 comments
Closed

MongoQuery type causes error in Vue3 composable return type #608

NicoAiko opened this issue Mar 30, 2022 · 2 comments
Labels

Comments

@NicoAiko
Copy link

Describe the bug
I have an interface that uses the MongoQuery type in one of its properties.
It seems that adding this type causes TS-4058 errors.
Return type of exported function has or is using name '$value' from external module "node_modules/@casl/ability/dist/types/hkt" but cannot be named.

To Reproduce
Steps to reproduce the behavior:

  1. Set up a regular vue3 app boilerplate
  2. Add casl
  3. Copy in the following code:
// A.ts
import type { MongoQuery } from '@casl/ability';

export interface A {
  foobar: MongoQuery;
}
// aTest.ts
import { ref } from 'vue';
import type { A } from './A';

export function useAtest() {
  const aBunchOfAs = ref<A[]>([]);
  return {
    aBunchOfAs,
  };
}

Expected behavior
Using the type should not cause an error.

CASL Version

@casl/ability - v5.4.3
@casl/vue - v2.1.2

Environment:
Node.JS v16.14.0
TypeScript v4.6.3

@NicoAiko NicoAiko added the bug label Mar 30, 2022
@stalniy
Copy link
Owner

stalniy commented Aug 28, 2022

cannot reproduce this

@stalniy
Copy link
Owner

stalniy commented Aug 28, 2022

but exported that symbol just in case it's needed by TS to generate other d.ts files. Exported in @casl/ability@6.1.1

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

No branches or pull requests

2 participants