Skip to content

Commit

Permalink
fix: inferred type error (#516)
Browse files Browse the repository at this point in the history
This PR fixes the compile error: `The inferred type of X cannot be named
without a reference`.

I'm not sure why this is not seen in CI...
  • Loading branch information
Alan Shaw authored May 17, 2023
1 parent 8b97ec0 commit 1bf4cf2
Show file tree
Hide file tree
Showing 7 changed files with 1,890 additions and 2,004 deletions.
1 change: 1 addition & 0 deletions eslint.packages.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ module.exports = {
'unicorn/prefer-export-from': 'off',
'unicorn/filename-case': 'off',
'unicorn/no-useless-undefined': 'off',
'unicorn/expiring-todo-comments': 'off',
'jsdoc/require-param': 'off',
'jsdoc/newline-after-description': 'off',
'jsdoc/require-param-type': 'off',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"scripts": {
"prepare": "pnpm run build && pnpm run compile",
"build": "rollup --config rollup.config.js && pnpm run typecheck",
"clean": "rm -rf node_modules package-lock.json coverage packages/*/{package-lock.json,build,node_modules}",
"clean": "rm -rf node_modules pnpm-lock.yaml coverage packages/*/{build,node_modules}",
"compile": "pnpm run --recursive --if-present compile",
"format": "pnpm --recursive --if-present run lint --fix",
"format:check": "lint",
Expand Down
4 changes: 2 additions & 2 deletions packages/solid-keyring/src/providers/Keyring.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ParentComponent } from 'solid-js'
import type { Context, ParentComponent } from 'solid-js'
import type {
KeyringContextState,
KeyringContextActions,
Expand Down Expand Up @@ -38,7 +38,7 @@ const defaultState: KeyringContextState = {
account: window.localStorage.getItem(W3UI_ACCOUNT_LOCALSTORAGE_KEY) ?? undefined
}

export const AuthContext = createContext<KeyringContextValue>([
export const AuthContext: Context<KeyringContextValue> = createContext<KeyringContextValue>([
defaultState,
{
loadAgent: async () => {},
Expand Down
5 changes: 3 additions & 2 deletions packages/vue-keyring/src/providers/Keyring.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import {
computed,
InjectionKey,
Ref,
shallowReactive
shallowReactive,
Component
} from 'vue'
import {
authorize as accessAuthorize,
Expand Down Expand Up @@ -64,7 +65,7 @@ export interface KeyringProviderProps extends ServiceConfig { }
/**
* Provider for authentication with the service.
*/
export const KeyringProvider = defineComponent<KeyringProviderProps>({
export const KeyringProvider: Component<KeyringProviderProps> = defineComponent<KeyringProviderProps>({
setup ({ servicePrincipal, connection }) {
const state = shallowReactive<KeyringContextState>({
agent: undefined,
Expand Down
5 changes: 3 additions & 2 deletions packages/vue-uploader/src/providers/Uploader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import {
inject,
Ref,
shallowReactive,
computed
computed,
Component
} from 'vue'
import {
uploadFile,
Expand Down Expand Up @@ -44,7 +45,7 @@ export interface UploaderProviderProps extends ServiceConfig {}
/**
* Provider for actions and state to facilitate uploads to the service.
*/
export const UploaderProvider = defineComponent<UploaderProviderProps>({
export const UploaderProvider: Component<UploaderProviderProps> = defineComponent<UploaderProviderProps>({
setup ({ servicePrincipal, connection }) {
const space = inject(KeyringProviderInjectionKey.space)
const agent = inject(KeyringProviderInjectionKey.agent)
Expand Down
5 changes: 3 additions & 2 deletions packages/vue-uploads-list/src/providers/UploadsList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import {
shallowReactive,
Ref,
computed,
watch
watch,
Component
} from 'vue'
import { KeyringProviderInjectionKey } from '@w3ui/vue-keyring'
import {
Expand Down Expand Up @@ -48,7 +49,7 @@ export interface UploadsListProviderProps extends ServiceConfig {
/**
* Provider for a list of items uploaded by the current identity.
*/
export const UploadsListProvider = defineComponent<UploadsListProviderProps>({
export const UploadsListProvider: Component<UploadsListProviderProps> = defineComponent<UploadsListProviderProps>({
setup ({ size, servicePrincipal, connection }) {
const space = inject(KeyringProviderInjectionKey.space)
const agent = inject(KeyringProviderInjectionKey.agent)
Expand Down
Loading

0 comments on commit 1bf4cf2

Please sign in to comment.