Skip to content

ehmpathy/domain-glossary-procedure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

domain-glossary-procedure

test publish

A declaration of intuitive and unambiguous Procedure resources and mechanisms.

purpose

declare a ubiquitious language for

  • resources related to Procedures

    • Procedure
  • mechanisms related to Procedures

    • etc

install

npm install domain-glossary-procedure

use

ProcedureInput

  // given: a simple procedure
  const doIt: Procedure<{ reason: string }, void, { done: true }> = (input: {
    reason: string;
  }) => {
    return { done: true };
  };

  // then: can extract the output type
  const reason: ProcedureInput<typeof doIt>['reason'] = '821'; // ✅ knows that reason is a string
  const reason: ProcedureInput<typeof doIt>['reason'] = 821; // 🛑 errors that reason is not a number

About

A declaration of intuitive and unambiguous **Procedure** resources and mechanisms.

Resources

License

Stars

Watchers

Forks

Packages

No packages published