Skip to content

Commit f3f0247

Browse files
committed
feat(core): expose getCurrentSchema function
1 parent f081ae5 commit f3f0247

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

packages/core/src/lib/compose/builder.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@ interface Schema {
88
const COMPOSE_KEY = 'schemas';
99
const SCHEMA_STACK: Schema[] = [];
1010

11-
function getCurrentSchema(): Schema | undefined {
11+
export function getCurrentSchema(): Schema | undefined {
1212
return SCHEMA_STACK[SCHEMA_STACK.length - 1];
1313
}
1414

15-
function enterSchema(schmea: Schema) {
16-
SCHEMA_STACK.push(schmea);
15+
function enterSchema(schema: Schema) {
16+
SCHEMA_STACK.push(schema);
1717
}
1818

1919
function leaveSchema() {
2020
SCHEMA_STACK.pop();
2121
}
2222

23-
function joinSchema(schmea: Schema) {
23+
function joinSchema(schema: Schema) {
2424
const currentSchema = getCurrentSchema();
2525
// If a schema already exists, just push it in as a subschema.
26-
currentSchema?.schemas!.push(schmea);
26+
currentSchema?.schemas!.push(schema);
2727
}
2828

2929
const IS_BUILDER = Symbol();

0 commit comments

Comments
 (0)