Skip to content

Commit 8aa6ba4

Browse files
committed
-up compiler.ts
1 parent 58eb6e8 commit 8aa6ba4

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "fbit-field",
3-
"version": "1.2.1-alpha.1c",
3+
"version": "1.2.1-alpha.1d",
44
"description": "bit field for some systems",
55
"main": "index.js",
66
"types": "index.d.ts",

src/compiler.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ class Compiler<T extends string> {
119119
* YOU WORKING WITH FILE SYSTEM, BE CAREFUL.
120120
* @recomendation PLEASE, USE DEFAULT METHOS.
121121
*/
122-
writeFile?: (me: Compiler<T>) => string;
122+
writeFile?: (me: Compiler<T>, values?: string) => string;
123123
/**
124124
* - !! WARNING !!
125125
* - !! WARNING !!
@@ -188,7 +188,7 @@ class Compiler<T extends string> {
188188
);
189189
}
190190

191-
public writeFile(me: this) {
191+
public writeFile(me: this, values: string = "") {
192192
const data = JSON.stringify(this.compile(me), undefined, 2)
193193
.replaceAll('"', "")
194194
.replaceAll("}", "} as const")
@@ -203,6 +203,7 @@ class Compiler<T extends string> {
203203
"\n */" +
204204
`\nexport const settings = ${data};` +
205205
"\n" +
206+
"\n" + values + "\n" +
206207
"\nexport type Keys = keyof typeof settings;" +
207208
"\nexport type Settings<T extends Keys> = (typeof settings)[T];" +
208209
"\nexport type SettingsKeys<T extends Keys> = keyof Settings<T>;" +

0 commit comments

Comments
 (0)