Skip to content

Latest commit

 

History

History

noop

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

noop(..._args) matches runtime function that does nothing with arguments _args

const platformConfigurationsMap = new Map<string, () => void>()
  .set("mobile", () => {
    // implementation
  })
  .set("desktop", () => {
    // implementation
  });

declare const platform: string;

const configurePlatform = platformConfigurationsMap.get(platform) ?? noop;

configurePlatform();

TS Playground – https://tsplay.dev/we63KN