Git Product home page Git Product logo

vue-ts-decorate's People

Contributors

indios avatar timsmanter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

luozhihua

vue-ts-decorate's Issues

Cannot find namespace 'himalayajs'.

I know this is an exact duplicate of #1, but this still doesn't seem to be fixed even though the issue has been closed.

For me, it's the at-loader (awesome-typescript-loader package) which complains during webpack build. The typings itself are not included within the current version of the npm package (1.0.0), but even after I downloaded them myself from the repo and included the file in tsconfig.json, the error still persists.

error message

ERROR in [at-loader] ./node_modules/vue-ts-decorate/utils/tools.ts:149:20
    TS2503: Cannot find namespace 'himalayajs'.

ERROR in [at-loader] ./node_modules/vue-ts-decorate/utils/tools.ts:167:23
    TS2503: Cannot find namespace 'absurdCss'.

env

Node: 6.10.3
Vue: 2.3.3
ts: 2.3.2

Compilation error: Cannot find namespace 'himalayajs', 'absurdCss'

Hi! I can't compile project with your library. My package.json:

 ...

  "dependencies": {
    "vue": "^2.1.10",
    "vue-router": "^2.1.1",
    "vuex": "^2.1.2"
  },
  "devDependencies": {
    "@types/node": "^7.0.0",
    "autoprefixer": "^6.7.4",
    "css-loader": "^0.26.1",
    "file-loader": "^0.10.0",
    "html-loader": "^0.4.4",
    "node-sass": "^4.5.0",
    "sass-loader": "^6.0.0",
    "ts-loader": "^2.0.0",
    "typescript": "^2.1.6",
    "url-loader": "^0.5.7",
    "vue-ts-decorate": "^1.0.0",
    "webpack": "^2.2.1"
  },

When I compile it with webpack I've following errors:

$ webpack

...

ERROR in /projects/.../node_modules/vue-ts-decorate/utils/tools.ts
(149,20): error TS2503: Cannot find namespace 'himalayajs'.

ERROR in /projects/.../node_modules/vue-ts-decorate/utils/tools.ts
(167,23): error TS2503: Cannot find namespace 'absurdCss'.

Any suggestions?

wrong default value for router option

You have wrong default value for router option here.

If I have <router-view> components in my template it makes me following error:

Uncaught TypeError: this._router.init is not a function
beforeCreate @ vue-router.common.js:421
callHook @ vue.common.js:2754
Vue._init @ vue.common.js:3377
VueComponent @ vue.common.js:3500
createComponentInstanceForVnode @ vue.common.js:1724
init @ vue.common.js:1734
(anonymous function) @ vue.common.js:1894
createComponent @ vue.common.js:4174
createElm @ vue.common.js:4117
createChildren @ vue.common.js:4242
createElm @ vue.common.js:4150
patch @ vue.common.js:4569
Vue._update @ vue.common.js:2635
updateComponent @ vue.common.js:2609
get @ vue.common.js:2934
Watcher @ vue.common.js:2926
Vue._mount @ vue.common.js:2608
Vue$3.$mount @ vue.common.js:6178
Vue$3.$mount @ vue.common.js:8549
init @ vue.common.js:1740
createComponent @ vue.common.js:4174
createElm @ vue.common.js:4117
patch @ vue.common.js:4605
Vue._update @ vue.common.js:2635
updateComponent @ vue.common.js:2609
get @ vue.common.js:2934
Watcher @ vue.common.js:2926
Vue._mount @ vue.common.js:2608
Vue$3.$mount @ vue.common.js:6178
Vue$3.$mount @ vue.common.js:8549
(anonymous function) @ main.ts:46
__webpack_require__ @ bootstrap a311129…:19
(anonymous function) @ bootstrap a311129…:65
(anonymous function) @ bootstrap a311129…:65

After some digging I found that VueRouter init() function expects that if router in options that it should be a VueRouter instance that have init method. See here. But you set this option to empty object if router is not setted in options that cause above error. After deleting line #57 in your utilities.ts all works fine.

Use other functions of filter class

Is it somehow possible to use full class-functionality for filters?
i.e. I want to create helper functions inside my filter.

@Filter('myFilter')
export class MyFilter {
  public filter(value: any, ...params: any[]) {
    this.helperClass(value); // --> not working
  }
  helperClass(value) { /* ... */ }
}

Is there any chance to get this working?
Doesn't work with static functions either.

Thanks,
janein

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.