pagekit / vue-resource

The HTTP client for Vue.js
MIT License
10.08k stars 1.6k forks source link

Typescript types not found #695

Open markus-s24 opened 6 years ago

markus-s24 commented 6 years ago

When trying to import types like HttpResponse from vue-resource they are not found since vue-resource 1.5.1. This worked with prior versions.

Steps to reproduce

Use a vue resource import in a typescript file, e.g.:

import { HttpResponse } from 'vue-resource';

What is Expected?

Type HttpResponse will successfully be imported.

What is actually happening?

Error: Module '".../node_modules/vue-resource/types/index"' has no exported member 'HttpResponse'.

Workaround

import VueResource from 'vue-resource';

and use qualified types like VueResource.HttpResponse in the code.