Files
docx-js/src/file/relationships/relationship/relationship.ts

26 lines
1.0 KiB
TypeScript
Raw Normal View History

2018-01-10 00:29:17 +00:00
import { XmlComponent } from "file/xml-components";
import { RelationshipAttributes } from "./relationship-attributes";
export type RelationshipType =
| "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image"
| "http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme"
| "http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings"
| "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles"
| "http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable"
| "http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings"
| "http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering";
export class Relationship extends XmlComponent {
constructor(id: string, type: RelationshipType, target: string) {
super("Relationship");
2018-01-23 01:33:12 +00:00
this.root.push(
new RelationshipAttributes({
id,
type,
target,
}),
);
2018-01-10 00:29:17 +00:00
}
}