Skip to content

Unable to Use Models in Typescript Project #682

@kyledecot

Description

@kyledecot

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Attempting to use one of the models exported as model results in Cannot find namespace 'model'.ts(2503).

Expected Behavior

No typescript errors.

Steps To Reproduce

import { Service } from "typedi";
import { Settings, importer, model } from "@coderline/alphatab";

@Service()
export class AlphaTabService {
  getScoreByBuffer(buffer: Buffer): model.Score { // Cannot find namespace 'model'.ts(2503)
    const settings = new Settings();

    return importer.ScoreLoader.loadScoreFromBytes(
      new Uint8Array(buffer),
      settings
    );
  }
}

Link to jsFiddle, CodePen, Project

No response

Found in Version

1.3-alpha

Platform

Node.js

Environment

- **OS**: MacOS 12.0.1 (21A559)
- **Browser**: N/A
- **.net Version**: N/A

Anything else?

Screen Shot 2021-11-23 at 9 38 24 AM

Metadata

Metadata

Assignees

Labels

area-coreRelated to some core parts of alphaTabplatform-javascriptRelated to the JavaScript version of alphaTabstate-acceptedThis is a valid topic to work on.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions