Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interface SpaceKind #810

Conversation

dburriss
Copy link
Contributor

@dburriss dburriss commented Mar 24, 2022

This is an implementation for #809 for adding the SpaceKind::Interface and enabling it as a function space in appropriate languages.

Supported languages that support interface:

  • Java
  • TypeScript
  • Tsx (including since different mechanism)

Java

interface printable{  
  void print();  
}  
class Printer implements printable{  
  public void print(){System.out.println("Hello");}  
    
  public static void main(String args[]){  
    Printer obj = new Printer ();  
    obj.print();  
  }  
}  

unit: foo.java

  • interface: printable
    -- function: print
  • class: Printer
    -- function:print

image

TS

interface IPrintable { 
    print: ()=>void 
} 
 
class Printer implements IPrintable {  
    print ():void {return console.log("Hello");} 
} 

unit: foo.ts

  • interface: IPrintable
    -- function: print
  • class: Printer
    -- function:print

image

TSX

interface IPrintable { 
    print: ()=>void 
}

unit: foo.tsx

  • interface: IPrintable
    -- function: print

image

@dburriss dburriss changed the title Dburriss/feature/issue 809/interface spacekind Interface SpaceKind Mar 25, 2022
@dburriss
Copy link
Contributor Author

@calixteman @marco-c Is this something we can merge in current state?

Copy link
Collaborator

@calixteman calixteman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you for doing that.

@calixteman calixteman merged commit 0cc9bcd into mozilla:master Mar 29, 2022
@dburriss dburriss mentioned this pull request Mar 29, 2022
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants