Skip to content

Commit 3551943

Browse files
committed
build-header: remove import from esm folder
1 parent b04270e commit 3551943

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

example/assets/locales/pt-br/translations.ftl.d.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
// This file is automatically generated.
22
// Please do not change this file!
33

4-
import { ComplexPattern } from '@fluent/bundle/esm/ast'
54
import { FluentBundle } from '@fluent/bundle'
65

7-
type Pattern<T> = T | ComplexPattern
6+
type Pattern<T extends MessagesKey> = T | Parameters<FluentBundle['formatPattern']>[0]
87

9-
type Message<T> = {
8+
type Message<T extends MessagesKey> = {
109
id: T
1110
value: Pattern<T>
1211
attributes: Record<string, Pattern<T>>

src/build-header.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@ const bannerMessage = (
55
)
66

77
const header = dedent`
8-
import { ComplexPattern } from '@fluent/bundle/esm/ast'
98
import { FluentBundle } from '@fluent/bundle'
109
11-
type Pattern<T> = T | ComplexPattern
10+
type Pattern<T extends MessagesKey> = T | Parameters<FluentBundle['formatPattern']>[0]
1211
13-
type Message<T> = {
12+
type Message<T extends MessagesKey> = {
1413
id: T
1514
value: Pattern<T>
1615
attributes: Record<string, Pattern<T>>

test/index.test.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,11 @@ test('Should match the types definitions', async () => {
1414
// This file is automatically generated.
1515
// Please do not change this file!
1616
17-
import { ComplexPattern } from '@fluent/bundle/esm/ast'
1817
import { FluentBundle } from '@fluent/bundle'
1918
20-
type Pattern<T> = T | ComplexPattern
19+
type Pattern<T extends MessagesKey> = T | Parameters<FluentBundle['formatPattern']>[0]
2120
22-
type Message<T> = {
21+
type Message<T extends MessagesKey> = {
2322
id: T
2423
value: Pattern<T>
2524
attributes: Record<string, Pattern<T>>

0 commit comments

Comments
 (0)