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

Error: Unable To Determine Member Modifier Type #3

Closed
JimLynchCodes opened this issue Dec 30, 2016 · 5 comments
Closed

Error: Unable To Determine Member Modifier Type #3

JimLynchCodes opened this issue Dec 30, 2016 · 5 comments
Labels

Comments

@JimLynchCodes
Copy link

When I run:
./bin/tplant.js -i ~/Git-Projects/t2-2/t2/CypherApp/src/app/app.component.ts

I now get this error:

/Users/jameslynch/Git-Projects/tplant/src/typescriptToMeta.js:154
        throw new Error("unable to determine member modifier type");
        ^

Error: unable to determine member modifier type
    at getMemberModifierType (/Users/jameslynch/Git-Projects/tplant/src/typescriptToMeta.js:154:15)
    at serializeMember (/Users/jameslynch/Git-Projects/tplant/src/typescriptToMeta.js:72:27)
    at serializeClass (/Users/jameslynch/Git-Projects/tplant/src/typescriptToMeta.js:209:34)
    at visit (/Users/jameslynch/Git-Projects/tplant/src/typescriptToMeta.js:47:25)
    at visitEachNode (/Users/jameslynch/Git-Projects/tplant/node_modules/typescript/lib/typescript.js:13907:30)
    at Object.forEachChild (/Users/jameslynch/Git-Projects/tplant/node_modules/typescript/lib/typescript.js:14078:24)
    at generateDocumentation (/Users/jameslynch/Git-Projects/tplant/src/typescriptToMeta.js:27:16)
    at module.exports (/Users/jameslynch/Git-Projects/tplant/src/typescriptToMeta.js:230:12)
    at Object.<anonymous> (/Users/jameslynch/Git-Projects/tplant/bin/tplant.js:19:5)
    at Module._compile (module.js:570:32)
tplant (master) ♘ 
@bafolts
Copy link
Owner

bafolts commented Dec 30, 2016 via email

@JimLynchCodes
Copy link
Author

It does this for a lot of my files. For example this one:

import { Injectable } from '@angular/core';
import * as firebase from "firebase";

@Injectable()
export class AuthJugglerService {

  constructor() { }


  public switchToGoogleAccount() {
    firebase.auth().signOut().then(() => {
      console.log('@$ logout successful!');
      console.log('@$ currentUser is now: !' + firebase.auth().currentUser);

      var provider:any = new firebase.auth.GoogleAuthProvider();
      firebase.auth().signInWithRedirect(provider).then((result) => {
        // console.log('@$ signin wiht google worked!' + e +', user is: ' + firebase.auth().currentUser.uid);
        console.log('@$ signin wiht google worked!' + result.user);

      }).catch((e) => {
        console.log('@$ signin wiht google failed!' + e);

        firebase.auth().signInAnonymously().then((user) => {
          console.log('@$ signed in anonymously againQ ' + user.uid);
          // console.log('@$ and firebase knows it: ' + firebase.auth().currentUser.uid);
        }).catch((e) => {
          console.log('@$ signed in anonymously failed ' + e);

        })

      })
    }).catch((e) => {
      console.log('@$ anonymous user signout failed!' + e);
    });
  }


}

@bafolts
Copy link
Owner

bafolts commented Dec 31, 2016

I pushed version 1.0.4 which should work for your pasted sample above. There was a rudimentary check in place that was determining which files should be parsed that I updated to ignore any declaration files.

@JimLynchCodes
Copy link
Author

nice! This one works for me!

It's just printing out to the console though. Should I be creating a plantUml file?

It would be awesome if it did. Or maybe another flag that creates the file right next to the specified typescript file. :)

@bafolts bafolts added the bug label Dec 31, 2016
@bafolts
Copy link
Owner

bafolts commented Dec 31, 2016

I will make a new issue to track that. Will add a -o option to specify the output.

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