How to use the @angular/cli/utilities/get-dependent-files.createTsSourceFile function in @angular/cli

To help you get started, we’ve selected a few @angular/cli examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github angular / angular-cli / tests / acceptance / get-dependent-files.spec.ts View on Github external
it('creates ts.SourceFile give a file path', (done) => {
      let sourceFile = path.join(rootPath, 'foo/foo.component.ts');
      return dependentFilesUtils.createTsSourceFile(sourceFile)
        .then((tsFile: ts.SourceFile) => {
          let isTsSourceFile = (tsFile.kind === ts.SyntaxKind.SourceFile);
          expect(isTsSourceFile).toBe(true);
        })
        .then(done, done.fail);
    });
  });
github angular / angular-cli / tests / acceptance / module-resolver.spec.ts View on Github external
        .then(() => dependentFilesUtils.createTsSourceFile(fooFile))
        .then((tsFileFoo: ts.SourceFile) => {
github angular / angular-cli / tests / acceptance / module-resolver.spec.ts View on Github external
        .then(() => dependentFilesUtils.createTsSourceFile(fooBazFile))
        .then((tsFile: ts.SourceFile) => {
github angular / angular-cli / tests / acceptance / module-resolver.spec.ts View on Github external
        .then(() => dependentFilesUtils.createTsSourceFile(fooBarFile))
        .then((tsFileFooBar: ts.SourceFile) => {
github angular / angular-cli / tests / acceptance / module-resolver.spec.ts View on Github external
        .then(() => dependentFilesUtils.createTsSourceFile(bazFile))
        .then((tsFile: ts.SourceFile) => {
github angular / angular-cli / tests / acceptance / module-resolver.spec.ts View on Github external
        .then(() => dependentFilesUtils.createTsSourceFile(barFile))
        .then((tsFileBar: ts.SourceFile) => {
github angular / angular-cli / tests / acceptance / module-resolver.spec.ts View on Github external
        .then(() => dependentFilesUtils.createTsSourceFile(fooQuxFile))
        .then((tsFileFooQux: ts.SourceFile) => {