@stringsync/vexml
Version:
MusicXML to Vexflow
30 lines (29 loc) • 1.3 kB
TypeScript
import { BarlineLocation, BarStyle, RepeatDirection, StartStopDiscontinue } from './enums';
import { NamedElement } from '../util';
/**
* Barline includes information about repeats, endings, and graphical bar styles.
*
* See https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/barline/
*/
export declare class Barline {
private element;
constructor(element: NamedElement<'barline'>);
/** Returns the bar style of the barline. Defaults to 'regular'. */
getBarStyle(): BarStyle;
/** Whether or not the barline is a repeat. Defaults to false. */
isRepeat(): boolean;
/** Returns the number of times the repeat should be played. Defaults to null. */
getRepeatTimes(): number | null;
/** Returns the repeat direction. Defaults to null. */
getRepeatDirection(): RepeatDirection | null;
/** Returns the location of the barline. Defaults to 'right'. */
getLocation(): BarlineLocation;
/** Whether or not the barline is an ending */
isEnding(): boolean;
/** Returns the ending text. Defaults to empty string. */
getEndingText(): string;
/** Returns the ending number. Defaults to '1'. */
getEndingNumber(): string;
/** Returns the ending type. Defaults to 'start'. */
getEndingType(): StartStopDiscontinue;
}