File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4646 - run : pnpm i -f # sync injected dependencies
4747 - run : pnpm test
4848 working-directory : test-app
49- - name : own types
50- working-directory : addon
51- run : pnpm tsc --noEmit
5249
5350 docs-gen :
5451 timeout-minutes : 5
8784 - name : Run Tests
8885 working-directory : test-app
8986 run : pnpm test
90- - name : own types
91- working-directory : addon
92- run : pnpm tsc --noEmit
9387
9488 try-scenarios :
9589 timeout-minutes : 10
@@ -130,9 +124,6 @@ jobs:
130124 - name : test
131125 working-directory : test-app
132126 run : node_modules/.bin/ember try:one ${{ matrix.ember-try-scenario }} --skip-cleanup
133- - name : types compatibility
134- working-directory : addon
135- run : pnpm lint:ts
136127
137128 types :
138129 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 11import { babel } from '@rollup/plugin-babel' ;
22import copy from 'rollup-plugin-copy' ;
33import { Addon } from '@embroider/addon-dev/rollup' ;
4- import { execaCommand } from "execa" ;
4+ import { execaCommand } from 'execa' ;
5+ import { fixBadDeclarationOutput } from 'fix-bad-declaration-output' ;
56
67const addon = new Addon ( {
78 srcDir : 'src' ,
@@ -72,9 +73,23 @@ export default {
7273 {
7374 name : 'Build declarations' ,
7475 closeBundle : async ( ) => {
75- console . log ( "Building types" ) ;
76- await execaCommand ( `pnpm glint --declaration` , { stdio : "inherit" } ) ;
77- }
78- }
76+ console . log ( 'Building types' ) ;
77+ await execaCommand ( `pnpm tsc --declaration` , { stdio : 'inherit' } ) ;
78+
79+ /**
80+ * https://github.com/microsoft/TypeScript/issues/56571#
81+ * README: https://github.com/NullVoxPopuli/fix-bad-declaration-output
82+ */
83+ console . log ( 'Fixing types' ) ;
84+ await fixBadDeclarationOutput ( 'declarations/**/*.d.ts' , [
85+ [ 'TypeScript#56571' , { types : 'all' } ] ,
86+ 'Glint#628' ,
87+ 'Glint#697' ,
88+ ] ) ;
89+ console . log (
90+ '⚠️ Dangerously (but neededly) fixed bad declaration output from typescript' ,
91+ ) ;
92+ } ,
93+ } ,
7994 ] ,
8095} ;
Original file line number Diff line number Diff line change 44 " src/**/*" ,
55 " unpublished-development-types/**/*"
66 ],
7- "glint" : {
8- "environment" : [" ember-loose" , " ember-template-imports" ]
9- },
107 "compilerOptions" : {
118 "allowJs" : true ,
129 "declarationDir" : " declarations" ,
You can’t perform that action at this time.
0 commit comments