File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
packages/sdk/shopify-oxygen/example Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import {createMiniOxygen} from '@shopify/mini-oxygen';
77 * For the actual example implementation, see the src/index.ts file.
88 */
99
10- const printValueAndBanner = ( flagKey , flagValue ) => {
10+ const printValueAndBanner = ( flagKey : string , flagValue : string ) => {
1111 console . log ( `*** The '${ flagKey } ' feature flag evaluates to ${ flagValue } .` ) ;
1212
1313 if ( flagValue ) {
@@ -48,8 +48,8 @@ const main = async () => {
4848 const interval = setInterval ( ( ) => {
4949 // NOTE: This is a bogus URL and will not be used in the actual fetch handler.
5050 // please see the src/index.ts file for the actual fetch handler.
51- miniOxygen . dispatchFetch ( 'https://localhost:8000' )
52- . then ( d => d . json ( ) )
51+ miniOxygen . dispatchFetch ( 'https://localhost:8000' as any )
52+ . then ( d => d . json ( ) as Promise < any > )
5353 . then ( ( { flagValue, flagKey} ) => {
5454 console . clear ( ) ;
5555 printValueAndBanner ( flagKey , flagValue ) ;
@@ -65,7 +65,7 @@ const main = async () => {
6565 process . stdin . resume ( ) ;
6666 process . stdin . setEncoding ( 'utf8' ) ;
6767
68- process . stdin . on ( 'data' , async ( key ) => {
68+ process . stdin . on ( 'data' , async ( key : string ) => {
6969 // Handle Ctrl+C
7070 if ( key === '\u0003' ) {
7171 clearInterval ( interval ) ;
Original file line number Diff line number Diff line change 44 "scripts" : {
55 "build" : " tsup" ,
66 "clean" : " rm -rf dist" ,
7- "start" : " yarn clean && yarn build && yarn node app.js "
7+ "start" : " yarn clean && yarn build && ts- node app.ts "
88 },
99 "type" : " module" ,
1010 "dependencies" : {
1111 "@launchdarkly/shopify-oxygen-sdk" : " latest" ,
12- "@shopify/mini-oxygen" : " ^4.0.0"
12+ "@shopify/mini-oxygen" : " ^4.0.0" ,
13+ "ts-node" : " ^10.9.2" ,
14+ "typescript" : " ^5.9.3"
1315 },
1416 "devDependencies" : {
1517 "tsup" : " ^8.5.1"
You can’t perform that action at this time.
0 commit comments